Android
java.security.cert
public class

java.security.cert.CertificateFactory

java.lang.Object
java.security.cert.CertificateFactory

This class provides the functionality of a certificate factory algorithm.

Summary

Protected Constructors

            CertificateFactory(CertificateFactorySpi certFacSpi, Provider provider, String type)

Public Methods

    final      CRL  generateCRL(InputStream inStream)
Generates and initializes a Certificate Revocation List from data from the provided input stream.
    final      Collection<? extends CRL generateCRLs(InputStream inStream)
Generates and initializes a collection of Certificate Revocation List from data from the provided input stream.
    final      CertPath  generateCertPath(InputStream inStream)
Generates a CertPath from data from the provided InputStream.
    final      CertPath  generateCertPath(List<? extends Certificate> certificates)
Generates a CertPath from the provided List of Certificates.
    final      CertPath  generateCertPath(InputStream inStream, String encoding)
Generates a CertPath from data from the provided InputStream.
    final      Certificate  generateCertificate(InputStream inStream)
Generates and initializes a Certificate from data from the provided input stream.
    final      Collection<? extends Certificate generateCertificates(InputStream inStream)
Generates and initializes a collection of Certificates from data from the provided input stream.
    final      Iterator<String getCertPathEncodings()
Returns an Iterator over the supported CertPath encodings (as Strings).
    final  static    CertificateFactory  getInstance(String type, String provider)
    final  static    CertificateFactory  getInstance(String type)
Returns a new CertificateFactory of the given type.
    final  static    CertificateFactory  getInstance(String type, Provider provider)
Returns a new CertificateFactory of the given type.
    final      Provider  getProvider()
Returns the Provider of the certificate factory represented by the receiver.
    final      String  getType()
Returns the Certificate type
Methods inherited from class java.lang.Object

Details

Protected Constructors

protected CertificateFactory(CertificateFactorySpi certFacSpi, Provider provider, String type)

Public Methods

public final CRL generateCRL(InputStream inStream)

Generates and initializes a Certificate Revocation List from data from the provided input stream.

Parameters

inStream InputStream Stream from where data is read to create the CRL

Returns

  • CRL an initialized Certificate Revocation List

Throws

CRLException if parsing problems are detected

public final Collection<? extends CRL> generateCRLs(InputStream inStream)

Generates and initializes a collection of Certificate Revocation List from data from the provided input stream.

Parameters

inStream InputStream Stream from where data is read to create the CRLs

Returns

  • Collection an initialized collection of Certificate Revocation List

Throws

CRLException if parsing problems are detected

public final CertPath generateCertPath(InputStream inStream)

Generates a CertPath from data from the provided InputStream. The default encoding is assumed.

Parameters

inStream InputStream with PKCS7 or PkiPath encoded data

Returns

  • CertPath a CertPath initialized from the provided data

Throws

CertificateException if parsing problems are detected

public final CertPath generateCertPath(List<? extends Certificate> certificates)

Generates a CertPath from the provided List of Certificates. The encoding is the default encoding.

Parameters

certificates List containing certificates in a format supported by the CertificateFactory

Returns

  • CertPath a CertPath initialized from the provided data

Throws

CertificateException if parsing problems are detected
UnsupportedOperationException if the provider does not implement this method

public final CertPath generateCertPath(InputStream inStream, String encoding)

Generates a CertPath from data from the provided InputStream. The encoding is that specified by the encoding parameter.

Parameters

inStream InputStream containing certificate path data in specified encoding
encoding encoding of the data in the input stream

Returns

  • CertPath a CertPath initialized from the provided data

Throws

CertificateException if parsing problems are detected
UnsupportedOperationException if the provider does not implement this method

public final Certificate generateCertificate(InputStream inStream)

Generates and initializes a Certificate from data from the provided input stream.

Parameters

inStream InputStream Stream from where data is read to create the Certificate

Returns

  • Certificate an initialized Certificate

Throws

CertificateException if parsing problems are detected

public final Collection<? extends Certificate> generateCertificates(InputStream inStream)

Generates and initializes a collection of Certificates from data from the provided input stream.

Parameters

inStream InputStream Stream from where data is read to create the Certificates

Returns

  • Collection an initialized collection of Certificates

Throws

CertificateException if parsing problems are detected

public final Iterator<String> getCertPathEncodings()

Returns an Iterator over the supported CertPath encodings (as Strings). The first element is the default encoding.

Returns

  • Iterator Iterator over supported CertPath encodings (as Strings)

public static final CertificateFactory getInstance(String type, String provider)

public static final CertificateFactory getInstance(String type)

Returns a new CertificateFactory of the given type.

Parameters

type java.lang.String Type of certificate desired

Returns

  • CertificateFactory a concrete implementation for the certificate type desired.

Throws

CertificateException If the type cannot be found
NullPointerException If the type is null

public static final CertificateFactory getInstance(String type, Provider provider)

Returns a new CertificateFactory of the given type.

Parameters

type java.lang.String Type of certificate desired
provider java.security.Provider Provider which has to implement the algorithm

Returns

  • CertificateFactory a concrete implementation for the certificate type desired.

Throws

CertificateException If the type cannot be found
NullPointerException If algorithm is null

public final Provider getProvider()

Returns the Provider of the certificate factory represented by the receiver.

Returns

  • Provider an instance of a subclass of java.security.Provider

public final String getType()

Returns the Certificate type

Returns

  • String type of certificate being used
Copyright 2007 Google Inc. Build 0.9_r1-98467 - 14 Aug 2008 18:48