Package co.nstant.in.cbor.encoder
Class AbstractEncoder<T>
java.lang.Object
co.nstant.in.cbor.encoder.AbstractEncoder<T>
- Direct Known Subclasses:
ArrayEncoder
,ByteStringEncoder
,DoublePrecisionFloatEncoder
,HalfPrecisionFloatEncoder
,MapEncoder
,NegativeIntegerEncoder
,SinglePrecisionFloatEncoder
,SpecialEncoder
,TagEncoder
,UnicodeStringEncoder
,UnsignedIntegerEncoder
public abstract class AbstractEncoder<T> extends Object
-
Field Summary
Fields Modifier and Type Field Description protected CborEncoder
encoder
-
Constructor Summary
Constructors Constructor Description AbstractEncoder(CborEncoder encoder, OutputStream outputStream)
-
Method Summary
Modifier and Type Method Description abstract void
encode(T dataItem)
protected void
encodeTypeAndLength(MajorType majorType, long length)
protected void
encodeTypeAndLength(MajorType majorType, BigInteger length)
protected void
encodeTypeChunked(MajorType majorType)
protected void
write(byte... bytes)
protected void
write(int b)
-
Field Details
-
Constructor Details
-
Method Details
-
encode
- Throws:
CborException
-
encodeTypeChunked
- Throws:
CborException
-
encodeTypeAndLength
- Throws:
CborException
-
encodeTypeAndLength
- Throws:
CborException
-
write
- Throws:
CborException
-
write
- Throws:
CborException
-