JcaCertStoreBuilder (Bouncy Castle Library 1.54 API Specification)
Date: 2015-12-29

org.bouncycastle.cert.jcajce

## Class JcaCertStoreBuilder

- java.lang.Object
- - org.bouncycastle.cert.jcajce.JcaCertStoreBuilder

-     public class JcaCertStoreBuilder
      extends java.lang.Object

  Builder to create a CertStore from certificate and CRL stores.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `JcaCertStoreBuilder()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `JcaCertStoreBuilder` | `addCertificate(X509CertificateHolder cert)` Add a single certificate.
    `JcaCertStoreBuilder` | `addCertificates(org.bouncycastle.util.Store certStore)` Add a store full of X509CertificateHolder objects.
    `JcaCertStoreBuilder` | `addCRL(X509CRLHolder crl)` Add a single CRL.
    `JcaCertStoreBuilder` | `addCRLs(org.bouncycastle.util.Store crlStore)` Add a store full of X509CRLHolder objects.
    `java.security.cert.CertStore` | `build()` Build the CertStore from the current inputs.
    `JcaCertStoreBuilder` | `setProvider(java.security.Provider provider)`
    `JcaCertStoreBuilder` | `setProvider(java.lang.String providerName)`
    `JcaCertStoreBuilder` | `setType(java.lang.String type)` Set the type of the CertStore generated.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### JcaCertStoreBuilder

          public JcaCertStoreBuilder()

  - ### Method Detail

    - #### addCertificates

          public JcaCertStoreBuilder addCertificates(org.bouncycastle.util.Store certStore)

      Add a store full of X509CertificateHolder objects.
      Parameters:
        `certStore` - a store of X509CertificateHolder objects.

    - #### addCertificate

          public JcaCertStoreBuilder addCertificate(X509CertificateHolder cert)

      Add a single certificate.
      Parameters:
        `cert` - the X509 certificate holder containing the certificate.

    - #### addCRLs

          public JcaCertStoreBuilder addCRLs(org.bouncycastle.util.Store crlStore)

      Add a store full of X509CRLHolder objects.
      Parameters:
        `crlStore` - a store of X509CRLHolder objects.

    - #### addCRL

          public JcaCertStoreBuilder addCRL(X509CRLHolder crl)

      Add a single CRL.
      Parameters:
        `crl` - the X509 CRL holder containing the CRL.

    - #### setProvider

          public JcaCertStoreBuilder setProvider(java.lang.String providerName)

    - #### setProvider

          public JcaCertStoreBuilder setProvider(java.security.Provider provider)

    - #### setType

          public JcaCertStoreBuilder setType(java.lang.String type)

      Set the type of the CertStore generated. By default it is "Collection".
      Parameters:
        `type` - type of CertStore passed to CertStore.getInstance().
      Returns:
        the current builder.

    - #### build

          public java.security.cert.CertStore build()
                                             throws java.security.GeneralSecurityException

      Build the CertStore from the current inputs.
      Returns:
        a CertStore.
      Throws:
        `java.security.GeneralSecurityException`