public interface TypeSerializer<T>
This interface can be implemented to provide custom serialization for objects of a given type.
| Modifier and Type | Method and Description |
|---|---|
T |
read(Class<T> type,
BufferInput buffer,
Serializer serializer)
Reads the object from the given buffer.
|
void |
write(T object,
BufferOutput buffer,
Serializer serializer)
Writes the object to the given buffer.
|
void write(T object, BufferOutput buffer, Serializer serializer)
object - The object to write.buffer - The buffer to which to write the object.serializer - The Catalyst serializer.T read(Class<T> type, BufferInput buffer, Serializer serializer)
type - The type to read.buffer - The buffer from which to read the object.serializer - The Catalyst serializer.Copyright © 2013–2015. All rights reserved.