Class ShortArrayBinaryDtoFieldCodec
java.lang.Object
io.datarouter.bytes.binarydto.fieldcodec.BinaryDtoBaseFieldCodec<short[]>
io.datarouter.bytes.binarydto.fieldcodec.array.ShortArrayBinaryDtoFieldCodec
public class ShortArrayBinaryDtoFieldCodec extends BinaryDtoBaseFieldCodec<short[]>
-
Constructor Summary
Constructors Constructor Description ShortArrayBinaryDtoFieldCodec() -
Method Summary
Modifier and Type Method Description intcompareAsIfEncoded(short[] left, short[] right)Override this with optimized implementations that avoid encoding.short[]decode(byte[] bytes, int offset, int length)byte[]encode(short[] value)booleansupportsComparableCodec()Override with true if the codec is suitable for comparable encoding.Methods inherited from class io.datarouter.bytes.binarydto.fieldcodec.BinaryDtoBaseFieldCodec
decode, fixedLength, isFixedLength, isVariableLength
-
Constructor Details
-
ShortArrayBinaryDtoFieldCodec
public ShortArrayBinaryDtoFieldCodec()
-
-
Method Details
-
supportsComparableCodec
public boolean supportsComparableCodec()Description copied from class:BinaryDtoBaseFieldCodecOverride with true if the codec is suitable for comparable encoding.- Specified by:
supportsComparableCodecin classBinaryDtoBaseFieldCodec<short[]>
-
encode
public byte[] encode(short[] value)- Specified by:
encodein classBinaryDtoBaseFieldCodec<short[]>
-
decode
public short[] decode(byte[] bytes, int offset, int length)- Specified by:
decodein classBinaryDtoBaseFieldCodec<short[]>
-
compareAsIfEncoded
public int compareAsIfEncoded(short[] left, short[] right)Description copied from class:BinaryDtoBaseFieldCodecOverride this with optimized implementations that avoid encoding.- Overrides:
compareAsIfEncodedin classBinaryDtoBaseFieldCodec<short[]>
-