Package org.mapdb.elsa
Interface ElsaSerializer
- All Known Implementing Classes:
ElsaSerializerBase,ElsaSerializerPojo
public interface ElsaSerializer
Elsa serializer and deserializer.
It turns object instance into binary form and vice versa.
-
Method Summary
Modifier and TypeMethodDescription<E> Eclone(E obj) Deep binary clone.<E> Edeserialize(DataInput input) Reads binary data from input and converts them into object instances.voidserialize(DataOutput output, Object obj) Converts object instance into binary form
-
Method Details
-
serialize
Converts 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:
IOException- an exception from underlying stream
-
deserialize
Reads 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:
IOException- an exception from underlying stream
-
clone
Deep 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:
IOException- an exception from underlying stream
-