public class ByteSerializer extends AbstractElementSerializer<java.lang.Byte>
| Modifier and Type | Field and Description |
|---|---|
static ByteSerializer |
INSTANCE
A static instance of a ByteSerializer
|
| Modifier | Constructor and Description |
|---|---|
private |
ByteSerializer()
Create a new instance of ByteSerializer
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.Byte |
deserialize(BufferHandler bufferHandler)
Deserialize an element from a BufferHandler
|
static java.lang.Byte |
deserialize(byte[] in)
A static method used to deserialize a Byte from a byte array.
|
static java.lang.Byte |
deserialize(byte[] in,
int start)
A static method used to deserialize a Byte from a byte array.
|
java.lang.Byte |
deserialize(java.nio.ByteBuffer buffer)
Deserialize an element from a ByteBuffer
|
java.lang.Byte |
fromBytes(byte[] in)
A method used to deserialize a Byte from a byte array.
|
java.lang.Byte |
fromBytes(byte[] in,
int start)
A method used to deserialize a Byte from a byte array.
|
static byte[] |
serialize(byte value)
Serialize a byte
|
byte[] |
serialize(java.lang.Byte element)
Produce the byte[] representation of the element
|
static byte[] |
serialize(byte[] buffer,
int start,
byte value)
Serialize a byte
|
compare, getComparator, getTypepublic static final ByteSerializer INSTANCE
public byte[] serialize(java.lang.Byte element)
element - The element to serializepublic static byte[] serialize(byte value)
value - the value to serializepublic static byte[] serialize(byte[] buffer,
int start,
byte value)
buffer - the Buffer that will contain the serialized valuestart - the position in the buffer we will store the serialized bytevalue - the value to serializepublic static java.lang.Byte deserialize(byte[] in)
in - The byte array containing the Bytepublic static java.lang.Byte deserialize(byte[] in,
int start)
in - The byte array containing the Bytestart - the position in the byte[] we will deserialize the byte frompublic java.lang.Byte fromBytes(byte[] in)
in - The byte array containing the Bytepublic java.lang.Byte fromBytes(byte[] in,
int start)
in - The byte array containing the Bytestart - the position in the byte[] we will deserialize the byte frompublic java.lang.Byte deserialize(java.nio.ByteBuffer buffer)
throws java.io.IOException
buffer - The incoming ByteBufferjava.io.IOException - If the deserialization failedpublic java.lang.Byte deserialize(BufferHandler bufferHandler) throws java.io.IOException
bufferHandler - The incoming bufferHandlerjava.io.IOException - If the deserialization failed