Package org.mapdb.elsa
Interface ElsaSerializer
-
- All Known Implementing Classes:
ElsaSerializerBase,ElsaSerializerPojo
public interface ElsaSerializerElsa serializer and deserializer. It turns object instance into binary form and vice versa.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description <E> Eclone(E obj)Deep binary clone.<E> Edeserialize(java.io.DataInput input)Reads binary data from input and converts them into object instances.voidserialize(java.io.DataOutput output, java.lang.Object obj)Converts object instance into binary form
-
-
-
Method Detail
-
serialize
void serialize(java.io.DataOutput output, java.lang.Object obj) throws java.io.IOExceptionConverts object instance into binary form- Parameters:
output- output into which binary data will be written while object is serializedobj- object instance to be serialized- Throws:
java.io.IOException- an exception from underlying stream
-
deserialize
<E> E deserialize(java.io.DataInput input) throws java.io.IOExceptionReads binary data from input and converts them into object instances.- Type Parameters:
E- type of deserialized object- Parameters:
input- input to read data from- Returns:
- deserialized object
- Throws:
java.io.IOException- an exception from underlying stream
-
clone
<E> E clone(E obj) throws java.io.IOExceptionDeep binary clone. Serialize object into binary form, and then use data to deserialize it. Returned object should be equal to original, but is completely different instance.- Type Parameters:
E- type of cloned object- Parameters:
obj- object instance to be cloned- Returns:
- deep clone
- Throws:
java.io.IOException- an exception from underlying stream
-
-