public class PlainJavaSerializer<T> extends java.lang.Object implements Serializer<T>
| Constructor and Description |
|---|
PlainJavaSerializer(java.lang.ClassLoader classLoader) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(T object,
java.nio.ByteBuffer binary)
Checks if the given instance and serial form
represent the same instance. |
T |
read(java.nio.ByteBuffer entry)
Reconstructs an instance from the given serial form.
|
java.nio.ByteBuffer |
serialize(T object)
Transforms the given instance into its serial form.
|
public PlainJavaSerializer(java.lang.ClassLoader classLoader)
public java.nio.ByteBuffer serialize(T object)
Serializerserialize in interface Serializer<T>object - the instance to serializepublic T read(java.nio.ByteBuffer entry) throws SerializerException, java.lang.ClassNotFoundException
Serializerread in interface Serializer<T>entry - the binary representation of the serial formSerializerException - if reading the byte buffer failsjava.lang.ClassNotFoundException - if the type to de-serialize to cannot be foundpublic boolean equals(T object, java.nio.ByteBuffer binary) throws SerializerException, java.lang.ClassNotFoundException
Serializerrepresent the same instance.equals in interface Serializer<T>object - the instance to checkbinary - the serial form to checktrue if both parameters represent equal instances, false otherwiseSerializerException - if reading the byte buffer failsjava.lang.ClassNotFoundException - if the type to de-serialize to cannot be found