public class X509StreamParser extends java.lang.Object implements StreamParser
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
X509StreamParserSpi
.
Modifier and Type | Field and Description |
---|---|
private java.security.Provider |
_provider |
private X509StreamParserSpi |
_spi |
Modifier | Constructor and Description |
---|---|
private |
X509StreamParser(java.security.Provider provider,
X509StreamParserSpi spi) |
Modifier and Type | Method and Description |
---|---|
private static X509StreamParser |
createParser(X509Util.Implementation impl) |
static X509StreamParser |
getInstance(java.lang.String type)
Generates a StreamParser object that implements the specified type.
|
static X509StreamParser |
getInstance(java.lang.String type,
java.security.Provider provider)
Generates a X509StreamParser object for the specified type from the
specified provider.
|
static X509StreamParser |
getInstance(java.lang.String type,
java.lang.String provider)
Generates a X509StreamParser object for the specified type from the
specified provider.
|
java.security.Provider |
getProvider() |
void |
init(byte[] data) |
void |
init(java.io.InputStream stream) |
java.lang.Object |
read() |
java.util.Collection |
readAll() |
private java.security.Provider _provider
private X509StreamParserSpi _spi
private X509StreamParser(java.security.Provider provider, X509StreamParserSpi spi)
public static X509StreamParser getInstance(java.lang.String type) throws NoSuchParserException
type
- The name of the requested X.509 object type.NoSuchParserException
- if the requested type is not available in the default
provider package or any of the other provider packages
that were searched.public static X509StreamParser getInstance(java.lang.String type, java.lang.String provider) throws NoSuchParserException, java.security.NoSuchProviderException
type
- the name of the requested X.509 object type.provider
- the name of the provider.NoSuchParserException
- if the type is not available from the specified provider.java.security.NoSuchProviderException
- if the provider can not be found.Provider
public static X509StreamParser getInstance(java.lang.String type, java.security.Provider provider) throws NoSuchParserException
type
- the name of the requested X.509 object type.provider
- the Provider to use.NoSuchParserException
- if the type is not available from the specified provider.Provider
private static X509StreamParser createParser(X509Util.Implementation impl)
public java.security.Provider getProvider()
public void init(java.io.InputStream stream)
public void init(byte[] data)
public java.lang.Object read() throws StreamParsingException
read
in interface StreamParser
StreamParsingException
public java.util.Collection readAll() throws StreamParsingException
readAll
in interface StreamParser
StreamParsingException
Copyright © 1998-2014 Gamma Technologies. All Rights Reserved.