Overview | Package | Class | Tree | Deprecated | Index | Help
| Bouncy Castle Cryptography 1.26
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.bouncycastle.jce.cert
Class CertificateFactory

    java.lang.Object
      |
      +--org.bouncycastle.jce.cert.CertificateFactory

public class CertificateFactory
extends java.lang.Object

Uses `CertUtil` to actualiy load the SPI classes.

See Also:
  `CertUtil`

Constructor Summary
`protected` | `CertificateFactory(CertificateFactorySpi certFacSpi, java.security.Provider provider, java.lang.String type)`

Method Summary
`java.security.cert.Certificate` | `generateCertificate(java.io.InputStream inStream)`
`java.util.Collection` | `generateCertificates(java.io.InputStream inStream)`
`CertPath` | `generateCertPath(java.io.InputStream inStream)` Generates a `CertPath` object and initializes it with the data read from the `InputStream` inStream.
`CertPath` | `generateCertPath(java.io.InputStream inStream, java.lang.String encoding)` Generates a `CertPath` object and initializes it with the data read from the `InputStream` inStream.
`CertPath` | `generateCertPath(java.util.List certificates)` Generates a `CertPath` object and initializes it with a `List` of `Certificate`s. The certificates supplied must be of a type supported by the `CertificateFactory`.
`java.security.cert.CRL` | `generateCRL(java.io.InputStream inStream)`
`java.util.Collection` | `generateCRLs(java.io.InputStream inStream)`
`java.util.Iterator` | `getCertPathEncodings()` Returns an iteration of the `CertPath` encodings supported by this certificate factory, with the default encoding first.
`static CertificateFactory` | `getInstance(java.lang.String type)`
`static CertificateFactory` | `getInstance(java.lang.String type, java.lang.String provider)`
`java.security.Provider` | `getProvider()`
`java.lang.String` | `getType()`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### CertificateFactory

    protected CertificateFactory(CertificateFactorySpi certFacSpi,
                                 java.security.Provider provider,
                                 java.lang.String type)

Method Detail

### generateCRL

    public final java.security.cert.CRL generateCRL(java.io.InputStream inStream)
                                             throws java.security.cert.CRLException

    `java.security.cert.CRLException`

### generateCRLs

    public final java.util.Collection generateCRLs(java.io.InputStream inStream)
                                            throws java.security.cert.CRLException

    `java.security.cert.CRLException`

### generateCertificate

    public final java.security.cert.Certificate generateCertificate(java.io.InputStream inStream)
                                                             throws java.security.cert.CertificateException

    `java.security.cert.CertificateException`

### generateCertificates

    public final java.util.Collection generateCertificates(java.io.InputStream inStream)
                                                    throws java.security.cert.CertificateException

    `java.security.cert.CertificateException`

### getCertPathEncodings

    public final java.util.Iterator getCertPathEncodings()

  Returns an iteration of the `CertPath` encodings supported by this certificate factory, with the default encoding first. See Appendix A in the Java Certification Path API Programmer's Guide for information about standard encoding names and their formats.
  Attempts to modify the returned `Iterator` via its `remove` method result in an `UnsupportedOperationException`.

  Returns:
    an `Iterator` over the names of the supported `CertPath` encodings (as `String`s)

### generateCertPath

    public final CertPath generateCertPath(java.io.InputStream inStream)
                                    throws java.security.cert.CertificateException

  Generates a `CertPath` object and initializes it with the data read from the `InputStream` inStream. The data is assumed to be in the default encoding. The name of the default encoding is the first element of the `Iterator` returned by the `getCertPathEncodings` method.

  Parameters:
    `inStream` - an `InputStream` containing the data
  Returns:
    a `CertPath` initialized with the data from the `InputStream`
  Throws:
    `java.security.cert.CertificateException` - if an exception occurs while decoding

### generateCertPath

    public final CertPath generateCertPath(java.io.InputStream inStream,
                                           java.lang.String encoding)
                                    throws java.security.cert.CertificateException

  Generates a `CertPath` object and initializes it with the data read from the `InputStream` inStream. The data is assumed to be in the specified encoding. See Appendix A in the Java Certification Path API Programmer's Guide for information about standard encoding names and their formats.

  Parameters:
    `inStream` - an `InputStream` containing the data
    `encoding` - the encoding used for the data
  Returns:
    a `CertPath` initialized with the data from the `InputStream`
  Throws:
    `java.security.cert.CertificateException` - if an exception occurs while decoding or the encoding requested is not supported

### generateCertPath

    public final CertPath generateCertPath(java.util.List certificates)
                                    throws java.security.cert.CertificateException

  Generates a `CertPath` object and initializes it with a `List` of `Certificate`s.
  The certificates supplied must be of a type supported by the `CertificateFactory`. They will be copied out of the supplied `List` object.

  Parameters:
    `certificates` - a `List` of `Certificate`s
  Returns:
    a `CertPath` initialized with the supplied list of certificates
  Throws:
    `java.security.cert.CertificateException` - if an exception occurs

### getInstance

    public static final CertificateFactory getInstance(java.lang.String type)
                                                throws java.security.cert.CertificateException

    `java.security.cert.CertificateException`

### getInstance

    public static final CertificateFactory getInstance(java.lang.String type,
                                                       java.lang.String provider)
                                                throws java.security.cert.CertificateException,
                                                       java.security.NoSuchProviderException

    `java.security.cert.CertificateException`
    `java.security.NoSuchProviderException`

### getProvider

    public final java.security.Provider getProvider()

### getType

    public final java.lang.String getType()

Overview | Package | Class | Tree | Deprecated | Index | Help
| Bouncy Castle Cryptography 1.26
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD