Top Description Fields Constructors Methods
org.bouncycastle.x509

public Class X509StreamParser

extends Object
implements StreamParser
Class Inheritance
All Implemented Interfaces
org.bouncycastle.x509.util.StreamParser
Imports
org.bouncycastle.x509.util.StreamParser, .StreamParsingException, java.io.ByteArrayInputStream, .InputStream, java.security.NoSuchAlgorithmException, .NoSuchProviderException, .Provider, java.util.Collection

This class allows access to different implementations for reading X.509 objects from streams.

A X509StreamParser is used to read a collection of objects or a single object of a certain X.509 object structure. E.g. one X509StreamParser can read certificates, another one CRLs, certification paths, attribute certificates and so on. The kind of object structure is specified with the algorithm parameter to the getInstance methods.

Implementations must implement the org.bouncycastle.x509.X509StreamParserSpi.

Field Summary

Modifier and TypeField and Description
private Provider
private X509StreamParserSpi

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
private static X509StreamParser
public static X509StreamParser

Returns:

a StreamParser object for the specified type.
getInstance
(String
The name of the requested X.509 object type.
type
)

Generates a StreamParser object that implements the specified type.

public static X509StreamParser

Returns:

a X509StreamParser object for the specified type.
getInstance
(String
the name of the requested X.509 object type.
type
,
String
the name of the provider.
provider
)

Generates a X509StreamParser object for the specified type from the specified provider.

public static X509StreamParser

Returns:

a X509StreamParser object for the specified type.
getInstance
(String
the name of the requested X.509 object type.
type
,
Provider
the Provider to use.
provider
)

Generates a X509StreamParser object for the specified type from the specified provider.

public Provider
public void
init(InputStream stream)

public void
init(byte[] data)

public Object
public Collection<E>
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

_providerback to summary
private Provider _provider
_spiback to summary
private X509StreamParserSpi _spi

Constructor Detail

X509StreamParserback to summary
private X509StreamParser(Provider provider, X509StreamParserSpi spi)

Method Detail

createParserback to summary
private static X509StreamParser createParser(X509Util.Implementation impl)
getInstanceback to summary
public static X509StreamParser getInstance(String type) throws NoSuchParserException

Generates a StreamParser object that implements the specified type. If the default provider package provides an implementation of the requested type, an instance of StreamParser containing that implementation is returned. If the type is not available in the default package, other packages are searched.

Parameters
type:String

The name of the requested X.509 object type.

Returns:X509StreamParser

a StreamParser object for the specified type.

Exceptions
NoSuchParserException:
if the requested type is not available in the default provider package or any of the other provider packages that were searched.
getInstanceback to summary
public static X509StreamParser getInstance(String type, String provider) throws NoSuchParserException, NoSuchProviderException

Generates a X509StreamParser object for the specified type from the specified provider.

Parameters
type:String

the name of the requested X.509 object type.

provider:String

the name of the provider.

Returns:X509StreamParser

a X509StreamParser object for the specified type.

Exceptions
NoSuchParserException:
if the type is not available from the specified provider.
NoSuchProviderException:
if the provider can not be found.
See Also
Provider
getInstanceback to summary
public static X509StreamParser getInstance(String type, Provider provider) throws NoSuchParserException

Generates a X509StreamParser object for the specified type from the specified provider.

Parameters
type:String

the name of the requested X.509 object type.

provider:Provider

the Provider to use.

Returns:X509StreamParser

a X509StreamParser object for the specified type.

Exceptions
NoSuchParserException:
if the type is not available from the specified provider.
See Also
Provider
getProviderback to summary
public Provider getProvider()
initback to summary
public void init(InputStream stream)
initback to summary
public void init(byte[] data)
readback to summary
public Object read() throws StreamParsingException

Implements org.bouncycastle.x509.util.StreamParser.read.

readAllback to summary
public Collection<E> readAll() throws StreamParsingException

Implements org.bouncycastle.x509.util.StreamParser.readAll.