org.bouncycastle.jce.provider
Class X509CertParser

java.lang.Object
  extended by org.bouncycastle.x509.X509StreamParserSpi
      extended by org.bouncycastle.jce.provider.X509CertParser

public class X509CertParser
extends X509StreamParserSpi


Field Summary
private  java.io.InputStream currentStream
           
private static PEMUtil PEM_PARSER
           
private  ASN1Set sData
           
private  int sDataObjectCount
           
 
Constructor Summary
X509CertParser()
           
 
Method Summary
 void engineInit(java.io.InputStream in)
          Initializes this stream parser with the input stream.
 java.lang.Object engineRead()
          Returns the next X.509 object of the type of this SPI from the given input stream.
 java.util.Collection engineReadAll()
          Returns all X.509 objects of the type of this SPI from the given input stream.
private  java.security.cert.Certificate getCertificate()
           
private  java.security.cert.Certificate readDERCertificate(java.io.InputStream in)
           
private  java.security.cert.Certificate readPEMCertificate(java.io.InputStream in)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PEM_PARSER

private static final PEMUtil PEM_PARSER

sData

private ASN1Set sData

sDataObjectCount

private int sDataObjectCount

currentStream

private java.io.InputStream currentStream
Constructor Detail

X509CertParser

public X509CertParser()
Method Detail

readDERCertificate

private java.security.cert.Certificate readDERCertificate(java.io.InputStream in)
                                                   throws java.io.IOException,
                                                          java.security.cert.CertificateParsingException
Throws:
java.io.IOException
java.security.cert.CertificateParsingException

getCertificate

private java.security.cert.Certificate getCertificate()
                                               throws java.security.cert.CertificateParsingException
Throws:
java.security.cert.CertificateParsingException

readPEMCertificate

private java.security.cert.Certificate readPEMCertificate(java.io.InputStream in)
                                                   throws java.io.IOException,
                                                          java.security.cert.CertificateParsingException
Throws:
java.io.IOException
java.security.cert.CertificateParsingException

engineInit

public void engineInit(java.io.InputStream in)
Description copied from class: X509StreamParserSpi
Initializes this stream parser with the input stream.

Specified by:
engineInit in class X509StreamParserSpi
Parameters:
in - The input stream.

engineRead

public java.lang.Object engineRead()
                            throws StreamParsingException
Description copied from class: X509StreamParserSpi
Returns the next X.509 object of the type of this SPI from the given input stream.

Specified by:
engineRead in class X509StreamParserSpi
Returns:
the next X.509 object in the stream or null if the end of the stream is reached.
Throws:
StreamParsingException - if the object cannot be created from input stream.

engineReadAll

public java.util.Collection engineReadAll()
                                   throws StreamParsingException
Description copied from class: X509StreamParserSpi
Returns all X.509 objects of the type of this SPI from the given input stream.

Specified by:
engineReadAll in class X509StreamParserSpi
Returns:
A collection of all X.509 objects in the input stream or null if the end of the stream is reached.
Throws:
StreamParsingException - if an object cannot be created from input stream.