public class SerializableSerde<T extends java.io.Serializable> extends java.lang.Object implements Serde<T>
Constructor and Description |
---|
SerializableSerde() |
Modifier and Type | Method and Description |
---|---|
T |
fromBytes(byte[] bytes)
Deserializes given serialized object from an array of bytes to its original form.
|
byte[] |
toBytes(T obj)
Serializes given object to an array of bytes.
|
public byte[] toBytes(T obj)
Serializer
toBytes
in interface Serializer<T extends java.io.Serializable>
obj
- Object of specific type to serialize.public T fromBytes(byte[] bytes)
Deserializer
fromBytes
in interface Deserializer<T extends java.io.Serializable>
bytes
- Array of bytes representing serialized object.