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.PrintWriterdebugOutput
-
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 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()org.bouncycastle.asn1.ASN1Objectparse(OERDefinition.Element element)java.math.BigIntegerparseInt(boolean unsigned, int size)org.bouncycastle.oer.OERInputStream.LengthInforeadLength()Reads a length determinant deals with long ans short versions.OERInputStream.Sequencesequence(int expectedOptional, boolean hasOptionalChildren, boolean hasExtension)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 org.bouncycastle.asn1.ASN1Object parse(OERDefinition.Element element) throws java.lang.Exception
- Throws:
java.lang.Exception
-
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.lang.ExceptionReads a length determinant deals with long ans short versions.- Returns:
- Throws:
java.lang.Exception
-
enumeration
public java.math.BigInteger enumeration() throws java.lang.Exception- Throws:
java.lang.Exception
-
sequence
public OERInputStream.Sequence sequence(int expectedOptional, boolean hasOptionalChildren, boolean hasExtension) throws java.lang.Exception
- Throws:
java.lang.Exception
-
choice
public OERInputStream.Choice choice() throws java.lang.Exception
- Throws:
java.lang.Exception
-
debugPrint
protected void debugPrint(java.lang.String what)
-
-