Class BinaryDtoBaseFieldCodec<T>
java.lang.Object
io.datarouter.bytes.binarydto.fieldcodec.BinaryDtoBaseFieldCodec<T>
- Direct Known Subclasses:
BaseArrayBinaryDtoFieldCodec,BinaryDtoConvertingFieldCodec,BinaryDtoField.BinaryDtoInvalidCodec,BooleanArrayBinaryDtoFieldCodec,BooleanBinaryDtoFieldCodec,ByteArrayBinaryDtoFieldCodec,ByteBinaryDtoFieldCodec,CharArrayBinaryDtoFieldCodec,CharBinaryDtoFieldCodec,DoubleArrayBinaryDtoFieldCodec,DoubleBinaryDtoFieldCodec,EnumBinaryDtoFieldCodec,FloatArrayBinaryDtoFieldCodec,FloatBinaryDtoFieldCodec,InstantBinaryDtoFieldCodec,IntArrayBinaryDtoFieldCodec,IntBinaryDtoFieldCodec,LongArrayBinaryDtoFieldCodec,LongBinaryDtoFieldCodec,NestedBinaryDtoFieldCodec,ShortArrayBinaryDtoFieldCodec,ShortBinaryDtoFieldCodec,SignedByteArrayBinaryDtoFieldCodec,Utf8BinaryDtoFieldCodec,VarIntBinaryDtoFieldCodec
public abstract class BinaryDtoBaseFieldCodec<T> extends Object
-
Constructor Summary
Constructors Constructor Description BinaryDtoBaseFieldCodec() -
Method Summary
Modifier and Type Method Description intcompareAsIfEncoded(T left, T right)Override this with optimized implementations that avoid encoding.Tdecode(byte[] bytes)abstract Tdecode(byte[] bytes, int offset, int length)abstract byte[]encode(T value)intfixedLength()booleanisFixedLength()booleanisVariableLength()abstract booleansupportsComparableCodec()Override with true if the codec is suitable for comparable encoding.
-
Constructor Details
-
BinaryDtoBaseFieldCodec
public BinaryDtoBaseFieldCodec()
-
-
Method Details
-
isFixedLength
public boolean isFixedLength() -
isVariableLength
public boolean isVariableLength() -
fixedLength
public int fixedLength() -
supportsComparableCodec
public abstract boolean supportsComparableCodec()Override with true if the codec is suitable for comparable encoding. -
encode
-
decode
-
decode
-
compareAsIfEncoded
Override this with optimized implementations that avoid encoding.
-