Package io.anyline.nfc.bouncycastle.asn1
Class ASN1InputStream
-
- All Implemented Interfaces:
-
io.anyline.nfc.bouncycastle.asn1.BERTags
,java.io.Closeable
,java.lang.AutoCloseable
public class ASN1InputStream extends FilterInputStream implements BERTags
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
Fields Modifier and Type Field Description public final static int
BOOLEAN
public final static int
INTEGER
public final static int
BIT_STRING
public final static int
OCTET_STRING
public final static int
NULL
public final static int
OBJECT_IDENTIFIER
public final static int
OBJECT_DESCRIPTOR
public final static int
EXTERNAL
public final static int
REAL
public final static int
ENUMERATED
public final static int
EMBEDDED_PDV
public final static int
UTF8_STRING
public final static int
RELATIVE_OID
public final static int
SEQUENCE
public final static int
SEQUENCE_OF
public final static int
SET
public final static int
SET_OF
public final static int
NUMERIC_STRING
public final static int
PRINTABLE_STRING
public final static int
T61_STRING
public final static int
VIDEOTEX_STRING
public final static int
IA5_STRING
public final static int
UTC_TIME
public final static int
GENERALIZED_TIME
public final static int
GRAPHIC_STRING
public final static int
VISIBLE_STRING
public final static int
GENERAL_STRING
public final static int
UNIVERSAL_STRING
public final static int
UNRESTRICTED_STRING
public final static int
BMP_STRING
public final static int
CONSTRUCTED
public final static int
UNIVERSAL
public final static int
APPLICATION
public final static int
TAGGED
public final static int
CONTEXT_SPECIFIC
public final static int
PRIVATE
-
Constructor Summary
Constructors Constructor Description ASN1InputStream(InputStream is)
ASN1InputStream(Array<byte> input)
Create an ASN1InputStream based on the input byte array. ASN1InputStream(Array<byte> input, boolean lazyEvaluate)
Create an ASN1InputStream based on the input byte array. ASN1InputStream(InputStream input, int limit)
Create an ASN1InputStream where no DER object will be longer than limit. ASN1InputStream(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(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.
-
Method Summary
Modifier and Type Method Description ASN1Primitive
readObject()
-
Methods inherited from class java.io.FilterInputStream
available, close, mark, markSupported, read, reset, skip
-
Methods inherited from class java.io.InputStream
nullInputStream, readAllBytes, readNBytes, readNBytes, transferTo
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Constructor Detail
-
ASN1InputStream
ASN1InputStream(InputStream is)
-
ASN1InputStream
ASN1InputStream(Array<byte> input)
Create an ASN1InputStream based on the input byte array.- Parameters:
input
- array containing ASN.1 encoded data.
-
ASN1InputStream
ASN1InputStream(Array<byte> input, boolean lazyEvaluate)
Create an ASN1InputStream based on the input byte array.- Parameters:
input
- array containing ASN.1 encoded data.lazyEvaluate
- true if parsing inside constructed objects can be delayed.
-
ASN1InputStream
ASN1InputStream(InputStream input, int limit)
Create an ASN1InputStream where no DER object will be longer than limit.- Parameters:
input
- stream containing ASN.1 encoded data.limit
- maximum size of a DER encoded object.
-
ASN1InputStream
ASN1InputStream(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.- Parameters:
input
- stream containing ASN.1 encoded data.lazyEvaluate
- true if parsing inside constructed objects can be delayed.
-
ASN1InputStream
ASN1InputStream(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.- Parameters:
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.
-
-
Method Detail
-
readObject
ASN1Primitive readObject()
-
-
-
-