com.lowagie.bc.asn1

Class ASN1InputStream

Implemented Interfaces:
DERTags

public class ASN1InputStream
extends DERInputStream

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.

Field Summary

private static DERObject
END_OF_STREAM
(package private) boolean
eofFound

Fields inherited from interface com.lowagie.bc.asn1.DERTags

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

Constructor Summary

ASN1InputStream(InputStream is)

Method Summary

private BERConstructedOctetString
buildConstructedOctetString()
protected DERObject
buildObject(int tag, byte[] bytes)
build an object given its tag and a byte stream to construct it from.
protected void
readFully(byte[] bytes)
private byte[]
readIndefiniteLengthFully()
read a string of bytes representing an indefinite length object.
protected int
readLength()
DERObject
readObject()

Methods inherited from class com.lowagie.bc.asn1.DERInputStream

buildObject, readFully, readLength, readObject

Field Details

END_OF_STREAM

private static final DERObject END_OF_STREAM

eofFound

(package private)  boolean eofFound

Constructor Details

ASN1InputStream

public ASN1InputStream(InputStream is)

Method Details

buildConstructedOctetString

private BERConstructedOctetString buildConstructedOctetString()
            throws IOException

buildObject

protected DERObject buildObject(int tag,
                                byte[] bytes)
            throws IOException
build an object given its tag and a byte stream to construct it from.
Overrides:
buildObject in interface DERInputStream

readFully

protected void readFully(byte[] bytes)
            throws IOException
Overrides:
readFully in interface DERInputStream

readIndefiniteLengthFully

private byte[] readIndefiniteLengthFully()
            throws IOException
read a string of bytes representing an indefinite length object.

readLength

protected int readLength()
            throws IOException
Overrides:
readLength in interface DERInputStream

readObject

public DERObject readObject()
            throws IOException
Overrides:
readObject in interface DERInputStream