public final class ByteArraySerializer
extends Object
implements SerializerDeserializer<byte[]>
byte[].| Modifier and Type | Method and Description |
|---|---|
static SerializerDeserializer<byte[]> |
byteArraySerializer(boolean forceCopy)
Create a new instance.
|
byte[] |
deserialize(Buffer serializedData,
BufferAllocator allocator) |
Buffer |
serialize(byte[] toSerialize,
BufferAllocator allocator) |
void |
serialize(byte[] toSerialize,
BufferAllocator allocator,
Buffer buffer) |
public static SerializerDeserializer<byte[]> byteArraySerializer(boolean forceCopy)
forceCopy - true means that data will always be copied from Buffer memory. false
means that if Buffer.hasArray() is true and the array offsets are aligned the result of
serialization doesn't have to be copied.byte[].public byte[] deserialize(Buffer serializedData,
BufferAllocator allocator)
deserialize in interface Deserializer<byte[]>public Buffer serialize(byte[] toSerialize,
BufferAllocator allocator)
serialize in interface Serializer<byte[]>public void serialize(byte[] toSerialize,
BufferAllocator allocator,
Buffer buffer)
serialize in interface Serializer<byte[]>