public class ShortSerializer extends AbstractElementSerializer<Short>
Modifier and Type | Field and Description |
---|---|
static ShortSerializer |
INSTANCE
A static instance of a ShortSerializer
|
Modifier and Type | Method and Description |
---|---|
Short |
deserialize(BufferHandler bufferHandler)
Deserialize an element from a BufferHandler
|
static Short |
deserialize(byte[] in)
A static method used to deserialize a Short from a byte array.
|
static Short |
deserialize(byte[] in,
int start)
A static method used to deserialize a Short from a byte array.
|
Short |
deserialize(ByteBuffer buffer)
Deserialize an element from a ByteBuffer
|
Short |
fromBytes(byte[] in)
A method used to deserialize a Short from a byte array.
|
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(Short element)
Produce the byte[] representation of the element
|
compare, getComparator, getType
public static final ShortSerializer INSTANCE
public byte[] serialize(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 Short deserialize(byte[] in)
in
- The byte array containing the Shortpublic static Short deserialize(byte[] in, int start)
in
- The byte array containing the Shortstart
- the position in the byte[] we will deserialize the short frompublic Short fromBytes(byte[] in)
in
- The byte array containing the Shortpublic Short fromBytes(byte[] in, int start)
in
- The byte array containing the Shortstart
- the position in the byte[] we will deserialize the short frompublic Short deserialize(ByteBuffer buffer) throws IOException
buffer
- The incoming ByteBufferIOException
- If the deserialization failedpublic Short deserialize(BufferHandler bufferHandler) throws IOException
bufferHandler
- The incoming bufferHandlerIOException
- If the deserialization failedCopyright © 2012–2015 Apache Mavibot Project Parent. All rights reserved.