Package org.bouncycastle.oer
Class OERInputStream
- java.lang.Object
-
- java.io.InputStream
-
- java.io.FilterInputStream
-
- org.bouncycastle.oer.OERInputStream
-
- All Implemented Interfaces:
java.io.Closeable,java.lang.AutoCloseable
- Direct Known Subclasses:
OERInputStream.Choice,OERInputStream.Sequence
public class OERInputStream extends java.io.FilterInputStream
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classOERInputStream.Choicestatic classOERInputStream.SequenceOER sequence decoder, decodes prefix and determines which optional parts are available.
-
Field Summary
Fields Modifier and Type Field Description protected java.io.PrintWriterdebugOutputprotected java.io.PrintWriterdebugStream
-
Constructor Summary
Constructors Constructor Description OERInputStream(java.io.InputStream src)Root decoder of OER streaming data.OERInputStream(java.io.InputStream src, int maxByteAllocation)Create an OER input and set the maximum byte array allocation size;
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description OERInputStream.Choicechoice()protected voiddebugPrint(java.lang.String what)java.math.BigIntegerenumeration()java.math.BigIntegerint16()java.math.BigIntegerint32()java.math.BigIntegerint64()java.math.BigIntegerint8()static org.bouncycastle.asn1.ASN1Encodableparse(byte[] src, Element element)Decode byte array.org.bouncycastle.asn1.ASN1Objectparse(Element element)java.math.BigIntegerparseInt(boolean unsigned, int size)protected org.bouncycastle.asn1.ASN1EncodableparseOpenType(Element e)org.bouncycastle.oer.OERInputStream.LengthInforeadLength()Reads a length determinant deals with long ans short versions.java.math.BigIntegeruint16()java.math.BigIntegeruint32()java.math.BigIntegeruint64()java.math.BigIntegeruint8()-
Methods inherited from class java.io.FilterInputStream
available, close, mark, markSupported, read, read, read, reset, skip
-
-
-
-
Constructor Detail
-
OERInputStream
public OERInputStream(java.io.InputStream src)
Root decoder of OER streaming data. Maximum byte array allocation is 1Mb- Parameters:
src- source stream.
-
OERInputStream
public OERInputStream(java.io.InputStream src, int maxByteAllocation)Create an OER input and set the maximum byte array allocation size;- Parameters:
src- The src.maxByteAllocation- the largest byte array that may eb allocated by this parser.
-
-
Method Detail
-
parse
public static org.bouncycastle.asn1.ASN1Encodable parse(byte[] src, Element element) throws java.io.IOExceptionDecode byte array.- Parameters:
src- The srcelement- The definition- Returns:
- Asn1Encodable instance
- Throws:
java.io.IOException
-
parse
public org.bouncycastle.asn1.ASN1Object parse(Element element) throws java.io.IOException
- Throws:
java.io.IOException
-
parseInt
public java.math.BigInteger parseInt(boolean unsigned, int size) throws java.lang.Exception- Throws:
java.lang.Exception
-
uint8
public java.math.BigInteger uint8() throws java.lang.Exception- Throws:
java.lang.Exception
-
uint16
public java.math.BigInteger uint16() throws java.lang.Exception- Throws:
java.lang.Exception
-
uint32
public java.math.BigInteger uint32() throws java.lang.Exception- Throws:
java.lang.Exception
-
uint64
public java.math.BigInteger uint64() throws java.lang.Exception- Throws:
java.lang.Exception
-
int8
public java.math.BigInteger int8() throws java.lang.Exception- Throws:
java.lang.Exception
-
int16
public java.math.BigInteger int16() throws java.lang.Exception- Throws:
java.lang.Exception
-
int32
public java.math.BigInteger int32() throws java.lang.Exception- Throws:
java.lang.Exception
-
int64
public java.math.BigInteger int64() throws java.lang.Exception- Throws:
java.lang.Exception
-
readLength
public org.bouncycastle.oer.OERInputStream.LengthInfo readLength() throws java.io.IOExceptionReads a length determinant deals with long ans short versions.- Returns:
- Throws:
java.lang.Exceptionjava.io.IOException
-
enumeration
public java.math.BigInteger enumeration() throws java.io.IOException- Throws:
java.io.IOException
-
parseOpenType
protected org.bouncycastle.asn1.ASN1Encodable parseOpenType(Element e) throws java.io.IOException
- Throws:
java.io.IOException
-
choice
public OERInputStream.Choice choice() throws java.io.IOException
- Throws:
java.io.IOException
-
debugPrint
protected void debugPrint(java.lang.String what)
-
-