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