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 CborDecoderdecoderprotected static intINFINITYprotected InputStreaminputStream
-
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 Tdecode(int initialByte)protected longgetLength(int initialByte)protected BigIntegergetLengthAsBigInteger(int initialByte)protected intnextSymbol()protected byte[]nextSymbols(int amount)voidsetMaxPreallocationSize(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)
-
-