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