T
- the type of data that can be deserializedpublic interface Deserializer<T>
serialized
data back to objects.Modifier and Type | Method and Description |
---|---|
T |
deserialize(byte[] buffer,
int bufferPosition)
Deserializes data from a byte buffer, beginning at the given position.
|
DataType<T> |
getDataType()
Gets the type of data this can deserialize.
|
int |
getSerializedSize(T value)
Gets the size of a byte array that would encode the given value.
|
T deserialize(byte[] buffer, int bufferPosition)
buffer
- the byte buffer to deserialize frombufferPosition
- the position in the buffer to start deserializing fromint getSerializedSize(T value)