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

## java.security.cert
Class CertificateFactory

    java.lang.Object
      |
      +--java.security.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
`Certificate` | `generateCertificate(java.io.InputStream inStream)`
`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(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`.
`CRL` | `generateCRL(java.io.InputStream inStream)`
`Collection` | `generateCRLs(java.io.InputStream inStream)`
`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 CRL generateCRL(java.io.InputStream inStream)
                          throws CRLException

    `CRLException`

### generateCRLs

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

    `CRLException`

### generateCertificate

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

    `CertificateException`

### generateCertificates

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

    `CertificateException`

### getCertPathEncodings

    public final 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 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:
    `CertificateException` - if an exception occurs while decoding

### generateCertPath

    public final CertPath generateCertPath(java.io.InputStream inStream,
                                           java.lang.String encoding)
                                    throws 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:
    `CertificateException` - if an exception occurs while decoding or the encoding requested is not supported

### generateCertPath

    public final CertPath generateCertPath(List certificates)
                                    throws 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:
    `CertificateException` - if an exception occurs

### getInstance

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

    `CertificateException`

### getInstance

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

    `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.22
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD