T - The type for the element to serializepublic interface Serializer<T>
| Modifier and Type | Method and Description |
|---|---|
int |
compare(T type1,
T type2)
Returns the comparison of two types.
|
T |
deserialize(BufferHandler bufferHandler)
Deserialize a type from a byte[]
|
byte[] |
serialize(T type)
Produce the byte[] representation of the type
|
byte[] serialize(T type)
type - The type to serializeT deserialize(BufferHandler bufferHandler) throws java.io.IOException
bufferHandler - The incoming BufferHandlerjava.io.IOException - If the deserialization failed