Top Fields Constructors Methods
org.bouncycastle.jce.provider

public Class X509CertParser

extends X509StreamParserSpi
Class Inheritance
Imports
java.io.BufferedInputStream, .IOException, .InputStream, java.security.cert.Certificate, .CertificateParsingException, java.util.ArrayList, .Collection, .List, org.bouncycastle.asn1.ASN1InputStream, .ASN1ObjectIdentifier, .ASN1Sequence, .ASN1Set, .ASN1TaggedObject, org.bouncycastle.asn1.pkcs.PKCSObjectIdentifiers, .SignedData, org.bouncycastle.x509.X509StreamParserSpi, org.bouncycastle.x509.util.StreamParsingException

Deprecated

use CertificateFactory or the PEMParser in the openssl package (pkix jar).

Field Summary

Modifier and TypeField and Description
private InputStream
private static final PEMUtil
private ASN1Set
private int

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
engineInit(InputStream
The input stream.
in
)

Implements abstract org.bouncycastle.x509.X509StreamParserSpi.engineInit.

Initializes this stream parser with the input stream.
public Object
engineRead()

Implements abstract org.bouncycastle.x509.X509StreamParserSpi.engineRead.

Returns the next X.509 object of the type of this SPI from the given input stream.
public Collection<E>
engineReadAll()

Implements abstract org.bouncycastle.x509.X509StreamParserSpi.engineReadAll.

Returns all X.509 objects of the type of this SPI from the given input stream.
private Certificate
private Certificate
private Certificate

Field Detail

currentStreamback to summary
private InputStream currentStream
PEM_PARSERback to summary
private static final PEMUtil PEM_PARSER
sDataback to summary
private ASN1Set sData
sDataObjectCountback to summary
private int sDataObjectCount

Constructor Detail

X509CertParserback to summary
public X509CertParser()

Method Detail

engineInitback to summary
public void engineInit(InputStream in)

Implements abstract org.bouncycastle.x509.X509StreamParserSpi.engineInit.

Doc from org.bouncycastle.x509.X509StreamParserSpi.engineInit.

Initializes this stream parser with the input stream.

Parameters
in:InputStream

The input stream.

engineReadback to summary
public Object engineRead() throws StreamParsingException

Implements abstract org.bouncycastle.x509.X509StreamParserSpi.engineRead.

Doc from org.bouncycastle.x509.X509StreamParserSpi.engineRead.

Returns the next X.509 object of the type of this SPI from the given input stream.

Returns:Object

the next X.509 object in the stream or null if the end of the stream is reached.

Exceptions
StreamParsingException:
if the object cannot be created from input stream.
engineReadAllback to summary
public Collection<E> engineReadAll() throws StreamParsingException

Implements abstract org.bouncycastle.x509.X509StreamParserSpi.engineReadAll.

Doc from org.bouncycastle.x509.X509StreamParserSpi.engineReadAll.

Returns all X.509 objects of the type of this SPI from the given input stream.

Returns:Collection<E>

A collection of all X.509 objects in the input stream or null if the end of the stream is reached.

Exceptions
StreamParsingException:
if an object cannot be created from input stream.
getCertificateback to summary
private Certificate getCertificate() throws CertificateParsingException
readDERCertificateback to summary
private Certificate readDERCertificate(InputStream in) throws IOException, CertificateParsingException
readPEMCertificateback to summary
private Certificate readPEMCertificate(InputStream in) throws IOException, CertificateParsingException