Class BinaryDtoComparableCodec<T extends ComparableBinaryDto<T>>
java.lang.Object
io.datarouter.bytes.binarydto.codec.BinaryDtoComparableCodec<T>
- All Implemented Interfaces:
Codec<T,byte[]>
public class BinaryDtoComparableCodec<T extends ComparableBinaryDto<T>> extends Object implements Codec<T,byte[]>
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.datarouter.bytes.Codec
Codec.FunctionalCodec<A,B>, Codec.NullPassthroughCodec<A,B> -
Field Summary
Fields Modifier and Type Field Description Class<T>dtoClassList<Field>fieldsList<? extends BinaryDtoFieldSchema<?>>fieldSchemas -
Method Summary
Modifier and Type Method Description Tdecode(byte[] bytes)TdecodePrefix(byte[] bytes, int numFields)intdecodePrefixLength(byte[] bytes, int offset, int numFields)LengthAndValue<T>decodeWithLength(byte[] bytes, int offset)byte[]encode(T dto)byte[]encodePrefix(T dto, int numFields)List<Field>getFieldsOrdered()static <T extends ComparableBinaryDto<T>>
BinaryDtoComparableCodec<T>of(Class<? extends T> dtoClass)Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.datarouter.bytes.Codec
encodeAndDecode
-
Field Details
-
dtoClass
-
fields
-
fieldSchemas
-
-
Method Details
-
of
public static <T extends ComparableBinaryDto<T>> BinaryDtoComparableCodec<T> of(Class<? extends T> dtoClass) -
getFieldsOrdered
-
encode
- Specified by:
encodein interfaceCodec<T extends ComparableBinaryDto<T>,byte[]>
-
encodePrefix
-
decode
- Specified by:
decodein interfaceCodec<T extends ComparableBinaryDto<T>,byte[]>
-
decodeWithLength
-
decodePrefixLength
public int decodePrefixLength(byte[] bytes, int offset, int numFields) -
decodePrefix
-