public class LongSerializer extends AbstractElementSerializer<Long>
Modifier and Type | Field and Description |
---|---|
static LongSerializer |
INSTANCE
A static instance of a LongSerializer
|
Modifier and Type | Method and Description |
---|---|
Long |
deserialize(BufferHandler bufferHandler)
Deserialize an element from a BufferHandler
|
static Long |
deserialize(byte[] in)
A static method used to deserialize a Long from a byte array.
|
static Long |
deserialize(byte[] in,
int start)
A static method used to deserialize an Integer from a byte array.
|
Long |
deserialize(ByteBuffer buffer)
Deserialize an element from a ByteBuffer
|
Long |
fromBytes(byte[] in)
A method used to deserialize a Long from a byte array.
|
Long |
fromBytes(byte[] in,
int start)
A method used to deserialize an Integer from a byte array.
|
static byte[] |
serialize(byte[] buffer,
int start,
long value)
Serialize an long
|
static byte[] |
serialize(long value)
Serialize an long
|
byte[] |
serialize(Long element)
Produce the byte[] representation of the element
|
compare, getComparator, getType
public static final LongSerializer INSTANCE
public byte[] serialize(Long element)
element
- The element to serializepublic static byte[] serialize(long value)
value
- the value to serializepublic static byte[] serialize(byte[] buffer, int start, long value)
buffer
- the Buffer that will contain the serialized valuestart
- the position in the buffer we will store the serialized longvalue
- the value to serializepublic static Long deserialize(byte[] in)
in
- The byte array containing the Longstart
- the position in the byte[] we will deserialize the long frompublic static Long deserialize(byte[] in, int start)
in
- The byte array containing the Integerstart
- the position in the byte[] we will deserialize the long frompublic Long fromBytes(byte[] in)
in
- The byte array containing the Longstart
- the position in the byte[] we will deserialize the long frompublic Long fromBytes(byte[] in, int start)
in
- The byte array containing the Integerstart
- the position in the byte[] we will deserialize the long frompublic Long deserialize(BufferHandler bufferHandler) throws IOException
bufferHandler
- The incoming bufferHandlerIOException
- If the deserialization failedpublic Long deserialize(ByteBuffer buffer) throws IOException
buffer
- The incoming ByteBufferIOException
- If the deserialization failedCopyright © 2012–2015 Apache Mavibot Project Parent. All rights reserved.