Package org.bouncycastle.oer
Class OERInputStream
java.lang.Object
java.io.InputStream
java.io.FilterInputStream
org.bouncycastle.oer.OERInputStream
- All Implemented Interfaces:
Closeable
,AutoCloseable
- Direct Known Subclasses:
OERInputStream.Choice
,OERInputStream.Sequence
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
static class
OER sequence decoder, decodes prefix and determines which optional parts are available. -
Field Summary
FieldsFields inherited from class java.io.FilterInputStream
in
-
Constructor Summary
ConstructorsConstructorDescriptionRoot decoder of OER streaming data.OERInputStream
(InputStream src, int maxByteAllocation) Create an OER input and set the maximum byte array allocation size; -
Method Summary
Modifier and TypeMethodDescriptionchoice()
protected void
debugPrint
(String what) int16()
int32()
int64()
int8()
org.bouncycastle.asn1.ASN1Object
parse
(OERDefinition.Element element) parseInt
(boolean unsigned, int size) org.bouncycastle.oer.OERInputStream.LengthInfo
Reads a length determinant deals with long ans short versions.sequence
(int expectedOptional, boolean hasOptionalChildren, boolean hasExtension) uint16()
uint32()
uint64()
uint8()
Methods inherited from class java.io.FilterInputStream
available, close, mark, markSupported, read, read, read, reset, skip
Methods inherited from class java.io.InputStream
nullInputStream, readAllBytes, readNBytes, readNBytes, skipNBytes, transferTo
-
Field Details
-
debugOutput
-
-
Constructor Details
-
OERInputStream
Root decoder of OER streaming data. Maximum byte array allocation is 1Mb- Parameters:
src
- source stream.
-
OERInputStream
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 Details
-
parse
- Throws:
Exception
-
parseInt
- Throws:
Exception
-
uint8
- Throws:
Exception
-
uint16
- Throws:
Exception
-
uint32
- Throws:
Exception
-
uint64
- Throws:
Exception
-
int8
- Throws:
Exception
-
int16
- Throws:
Exception
-
int32
- Throws:
Exception
-
int64
- Throws:
Exception
-
readLength
Reads a length determinant deals with long ans short versions.- Returns:
- Throws:
Exception
-
enumeration
- Throws:
Exception
-
sequence
public OERInputStream.Sequence sequence(int expectedOptional, boolean hasOptionalChildren, boolean hasExtension) throws Exception - Throws:
Exception
-
choice
- Throws:
Exception
-
debugPrint
-