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 intBOOLEANpublic final static intINTEGERpublic final static intBIT_STRINGpublic final static intOCTET_STRINGpublic final static intNULLpublic final static intOBJECT_IDENTIFIERpublic final static intOBJECT_DESCRIPTORpublic final static intEXTERNALpublic final static intREALpublic final static intENUMERATEDpublic final static intEMBEDDED_PDVpublic final static intUTF8_STRINGpublic final static intRELATIVE_OIDpublic final static intSEQUENCEpublic final static intSEQUENCE_OFpublic final static intSETpublic final static intSET_OFpublic final static intNUMERIC_STRINGpublic final static intPRINTABLE_STRINGpublic final static intT61_STRINGpublic final static intVIDEOTEX_STRINGpublic final static intIA5_STRINGpublic final static intUTC_TIMEpublic final static intGENERALIZED_TIMEpublic final static intGRAPHIC_STRINGpublic final static intVISIBLE_STRINGpublic final static intGENERAL_STRINGpublic final static intUNIVERSAL_STRINGpublic final static intUNRESTRICTED_STRINGpublic final static intBMP_STRINGpublic final static intCONSTRUCTEDpublic final static intUNIVERSALpublic final static intAPPLICATIONpublic final static intTAGGEDpublic final static intCONTEXT_SPECIFICpublic final static intPRIVATE
-
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 ASN1PrimitivereadObject()-
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()
-
-
-
-