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
Modifier and TypeClassDescriptionstatic class
static class
OER sequence decoder, decodes prefix and determines which optional parts are available. -
Field Summary
Fields inherited from class java.io.FilterInputStream
in
-
Constructor Summary
ConstructorDescriptionRoot 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()
static org.bouncycastle.asn1.ASN1Encodable
Decode byte array.org.bouncycastle.asn1.ASN1Object
parseInt
(boolean unsigned, int size) protected org.bouncycastle.asn1.ASN1Encodable
org.bouncycastle.oer.OERInputStream.LengthInfo
Reads a length determinant deals with long ans short versions.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
-
debugStream
-
-
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
public static org.bouncycastle.asn1.ASN1Encodable parse(byte[] src, Element element) throws IOException Decode byte array.- Parameters:
src
- The srcelement
- The definition- Returns:
- Asn1Encodable instance
- Throws:
IOException
-
parse
- Throws:
IOException
-
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
IOException
-
enumeration
- Throws:
IOException
-
parseOpenType
- Throws:
IOException
-
choice
- Throws:
IOException
-
debugPrint
-