Class BinaryDtoCodec<T extends BinaryDto<T>>

java.lang.Object
io.datarouter.bytes.binarydto.codec.BinaryDtoCodec<T>

public class BinaryDtoCodec<T extends BinaryDto<T>>
extends Object
  • Field Details

  • Method Details

    • of

      public static <T extends BinaryDto<T>> BinaryDtoCodec<T> of​(Class<? extends T> dtoClass)
    • getFieldsOrdered

      public List<Field> getFieldsOrdered()
    • encode

      public byte[] encode​(T dto)
    • encodePrefix

      public byte[] encodePrefix​(T dto, int numFields)
    • decode

      public T decode​(byte[] bytes)
    • decode

      public T decode​(byte[] bytes, int offset)
    • decodeWithLength

      public LengthAndValue<T> decodeWithLength​(byte[] bytes)
    • decodeWithLength

      public LengthAndValue<T> decodeWithLength​(byte[] bytes, int offset)
    • decodePrefixLength

      public int decodePrefixLength​(byte[] bytes, int offset, int numFields)
    • decodePrefix

      public T decodePrefix​(byte[] bytes, int offset, int numFields)
    • deepCopy

      public T deepCopy​(T dto)