public final class BinarySerializer extends SerializerSingleton<byte[]>
byte[].| Modifier and Type | Field and Description |
|---|---|
static BinarySerializer |
INSTANCE
Sharable instance of the IntSerializer.
|
| Constructor and Description |
|---|
BinarySerializer() |
| Modifier and Type | Method and Description |
|---|---|
byte[] |
copy(byte[] from)
Creates a deep copy of the given element in a new element.
|
byte[] |
deserialize(DataInputView source)
De-serializes a record from the given source input view.
|
void |
serialize(byte[] record,
DataOutputView target)
Serializes the given record to the given target output view.
|
duplicate, equals, hashCodeclone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitdeserializeFromString, serializeToStringpublic static final BinarySerializer INSTANCE
public byte[] copy(byte[] from)
Serializerfrom - The element reuse be copied.public void serialize(byte[] record,
DataOutputView target)
throws IOException
Serializerrecord - The record to serialize.target - The output view to write the serialized data to.IOException - Thrown, if the serialization encountered an I/O related error. Typically
raised by the output view, which may have an underlying I/O channel to which it
delegates.public byte[] deserialize(DataInputView source) throws IOException
Serializersource - The input view from which to read the data.IOException - Thrown, if the de-serialization encountered an I/O related error.
Typically raised by the input view, which may have an underlying I/O channel from which
it reads.Copyright © 2023–2024 The Apache Software Foundation. All rights reserved.