org.bouncycastle.asn1
Class ASN1InputStream
FilterInputStreamorg.bouncycastle.asn1.ASN1InputStream
- DERTags
public class ASN1InputStream
extends FilterInputStream
a general purpose ASN.1 decoder - note: this class differs from the
others in that it returns null after it has read the last object in
the stream. If an ASN.1 NULL is encountered a DER/BER Null object is
returned.
APPLICATION, BIT_STRING, BMP_STRING, BOOLEAN, CONSTRUCTED, ENUMERATED, EXTERNAL, GENERALIZED_TIME, GENERAL_STRING, 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 |
ASN1InputStream(InputStream is)
|
ASN1InputStream(InputStream input, int limit)- Create an ASN1InputStream where no DER object will be longer than limit.
|
ASN1InputStream(byte[] input)- Create an ASN1InputStream based on the input byte array.
|
ASN1InputStream
public ASN1InputStream(InputStream is)
ASN1InputStream
public ASN1InputStream(InputStream input,
int limit) Create an ASN1InputStream where no DER object will be longer than limit.
input - stream containing ASN.1 encoded data.limit - maximum size of a DER encoded object.
ASN1InputStream
public ASN1InputStream(byte[] input)
Create an ASN1InputStream based on the input byte array. The length of DER objects in
the stream is automatically limited to the length of the input array.
input - array containing ASN.1 encoded data.
buildObject
protected DERObject buildObject(int tag,
int tagNo,
byte[] bytes)
throws IOException build an object given its tag and a byte stream to construct it
from.
readFully
protected void readFully(byte[] bytes)
throws IOException
readLength
protected int readLength()
throws IOException
readObject
public DERObject readObject()
throws IOException