Package co.nstant.in.cbor.decoder
Class AbstractDecoder<T>
- java.lang.Object
-
- co.nstant.in.cbor.decoder.AbstractDecoder<T>
-
- Direct Known Subclasses:
ArrayDecoder
,ByteStringDecoder
,DoublePrecisionFloatDecoder
,HalfPrecisionFloatDecoder
,MapDecoder
,NegativeIntegerDecoder
,SinglePrecisionFloatDecoder
,SpecialDecoder
,TagDecoder
,UnicodeStringDecoder
,UnsignedIntegerDecoder
public abstract class AbstractDecoder<T> extends Object
-
-
Field Summary
Fields Modifier and Type Field Description protected CborDecoder
decoder
protected static int
INFINITY
protected InputStream
inputStream
-
Constructor Summary
Constructors Constructor Description AbstractDecoder(CborDecoder decoder, InputStream inputStream)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract T
decode(int initialByte)
protected long
getLength(int initialByte)
protected BigInteger
getLengthAsBigInteger(int initialByte)
protected int
nextSymbol()
protected byte[]
nextSymbols(int amount)
void
setMaxPreallocationSize(int maxPreallocationSize)
-
-
-
Field Detail
-
INFINITY
protected static final int INFINITY
- See Also:
- Constant Field Values
-
inputStream
protected final InputStream inputStream
-
decoder
protected final CborDecoder decoder
-
-
Constructor Detail
-
AbstractDecoder
public AbstractDecoder(CborDecoder decoder, InputStream inputStream)
-
-
Method Detail
-
decode
public abstract T decode(int initialByte) throws CborException
- Throws:
CborException
-
nextSymbol
protected int nextSymbol() throws CborException
- Throws:
CborException
-
nextSymbols
protected byte[] nextSymbols(int amount) throws CborException
- Throws:
CborException
-
getLength
protected long getLength(int initialByte) throws CborException
- Throws:
CborException
-
getLengthAsBigInteger
protected BigInteger getLengthAsBigInteger(int initialByte) throws CborException
- Throws:
CborException
-
setMaxPreallocationSize
public void setMaxPreallocationSize(int maxPreallocationSize)
-
-