public class ASN1InputStream extends java.io.FilterInputStream implements BERTags
| Modifier and Type | Field and Description |
|---|---|
private boolean |
lazyEvaluate |
private int |
limit |
private byte[][] |
tmpBuffers |
APPLICATION, BIT_STRING, BMP_STRING, BOOLEAN, CONSTRUCTED, ENUMERATED, EXTERNAL, GENERAL_STRING, GENERALIZED_TIME, GRAPHIC_STRING, IA5_STRING, INTEGER, NULL, NUMERIC_STRING, OBJECT_IDENTIFIER, OCTET_STRING, PRINTABLE_STRING, SEQUENCE, SEQUENCE_OF, SET, SET_OF, T61_STRING, TAGGED, UNIVERSAL_STRING, UTC_TIME, UTF8_STRING, VIDEOTEX_STRING, VISIBLE_STRING| Constructor and Description |
|---|
ASN1InputStream(byte[] input)
Create an ASN1InputStream based on the input byte array.
|
ASN1InputStream(byte[] input,
boolean lazyEvaluate)
Create an ASN1InputStream based on the input byte array.
|
ASN1InputStream(java.io.InputStream is) |
ASN1InputStream(java.io.InputStream input,
boolean lazyEvaluate)
Create an ASN1InputStream where no DER object will be longer than limit, and constructed
objects such as sequences will be parsed lazily.
|
ASN1InputStream(java.io.InputStream input,
int limit)
Create an ASN1InputStream where no DER object will be longer than limit.
|
ASN1InputStream(java.io.InputStream input,
int limit,
boolean lazyEvaluate)
Create an ASN1InputStream where no DER object will be longer than limit, and constructed
objects such as sequences will be parsed lazily.
|
| Modifier and Type | Method and Description |
|---|---|
(package private) ASN1EncodableVector |
buildDEREncodableVector(DefiniteLengthInputStream dIn) |
(package private) ASN1EncodableVector |
buildEncodableVector() |
protected ASN1Primitive |
buildObject(int tag,
int tagNo,
int length)
build an object given its tag and the number of bytes to construct it from.
|
(package private) static ASN1Primitive |
createPrimitiveDERObject(int tagNo,
DefiniteLengthInputStream defIn,
byte[][] tmpBuffers) |
private static char[] |
getBMPCharBuffer(DefiniteLengthInputStream defIn) |
private static byte[] |
getBuffer(DefiniteLengthInputStream defIn,
byte[][] tmpBuffers) |
(package private) int |
getLimit() |
protected void |
readFully(byte[] bytes) |
protected int |
readLength() |
(package private) static int |
readLength(java.io.InputStream s,
int limit) |
ASN1Primitive |
readObject() |
(package private) static int |
readTagNumber(java.io.InputStream s,
int tag) |
private final int limit
private final boolean lazyEvaluate
private final byte[][] tmpBuffers
public ASN1InputStream(java.io.InputStream is)
public ASN1InputStream(byte[] input)
input - array containing ASN.1 encoded data.public ASN1InputStream(byte[] input, boolean lazyEvaluate)
input - array containing ASN.1 encoded data.lazyEvaluate - true if parsing inside constructed objects can be delayed.public ASN1InputStream(java.io.InputStream input, int limit)
input - stream containing ASN.1 encoded data.limit - maximum size of a DER encoded object.public ASN1InputStream(java.io.InputStream input, boolean lazyEvaluate)
input - stream containing ASN.1 encoded data.lazyEvaluate - true if parsing inside constructed objects can be delayed.public ASN1InputStream(java.io.InputStream input, int limit, boolean lazyEvaluate)
input - stream containing ASN.1 encoded data.limit - maximum size of a DER encoded object.lazyEvaluate - true if parsing inside constructed objects can be delayed.int getLimit()
protected int readLength() throws java.io.IOException
java.io.IOExceptionprotected void readFully(byte[] bytes) throws java.io.IOException
java.io.IOExceptionprotected ASN1Primitive buildObject(int tag, int tagNo, int length) throws java.io.IOException
tag - the full tag details.tagNo - the tagNo defined.length - the length of the object.java.io.IOException - on processing exception.ASN1EncodableVector buildEncodableVector() throws java.io.IOException
java.io.IOExceptionASN1EncodableVector buildDEREncodableVector(DefiniteLengthInputStream dIn) throws java.io.IOException
java.io.IOExceptionpublic ASN1Primitive readObject() throws java.io.IOException
java.io.IOExceptionstatic int readTagNumber(java.io.InputStream s, int tag) throws java.io.IOException
java.io.IOExceptionstatic int readLength(java.io.InputStream s, int limit) throws java.io.IOException
java.io.IOExceptionprivate static byte[] getBuffer(DefiniteLengthInputStream defIn, byte[][] tmpBuffers) throws java.io.IOException
java.io.IOExceptionprivate static char[] getBMPCharBuffer(DefiniteLengthInputStream defIn) throws java.io.IOException
java.io.IOExceptionstatic ASN1Primitive createPrimitiveDERObject(int tagNo, DefiniteLengthInputStream defIn, byte[][] tmpBuffers) throws java.io.IOException
java.io.IOException