Package com.usatiuk.objects
Interface ObjectSerializer<T>
- Type Parameters:
T
- the type of object to serialize/deserialize
- All Known Implementing Classes:
JavaDataSerializer
public interface ObjectSerializer<T>
Interface for serializing and deserializing objects.
-
Method Summary
Modifier and TypeMethodDescriptiondeserialize
(ByteBuffer data) Deserialize an object from a ByteBuffer.com.google.protobuf.ByteString
Serialize an object to a ByteString.
-
Method Details
-
serialize
Serialize an object to a ByteString.- Parameters:
obj
- the object to serialize- Returns:
- the serialized object as a ByteString
-
deserialize
Deserialize an object from a ByteBuffer.- Parameters:
data
- the ByteBuffer containing the serialized object- Returns:
- the deserialized object
-