public class LongSerializer extends AbstractElementSerializer<java.lang.Long>
| Modifier and Type | Field and Description |
|---|---|
static LongSerializer |
INSTANCE
A static instance of a LongSerializer
|
| Modifier | Constructor and Description |
|---|---|
private |
LongSerializer()
Create a new instance of LongSerializer
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.Long |
deserialize(BufferHandler bufferHandler)
Deserialize an element from a BufferHandler
|
static java.lang.Long |
deserialize(byte[] in)
A static method used to deserialize a Long from a byte array.
|
static java.lang.Long |
deserialize(byte[] in,
int start)
A static method used to deserialize an Integer from a byte array.
|
java.lang.Long |
deserialize(java.nio.ByteBuffer buffer)
Deserialize an element from a ByteBuffer
|
java.lang.Long |
fromBytes(byte[] in)
A method used to deserialize a Long from a byte array.
|
java.lang.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(java.lang.Long element)
Produce the byte[] representation of the element
|
compare, getComparator, getTypepublic static final LongSerializer INSTANCE
public byte[] serialize(java.lang.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 java.lang.Long deserialize(byte[] in)
in - The byte array containing the Longstart - the position in the byte[] we will deserialize the long frompublic static java.lang.Long deserialize(byte[] in,
int start)
in - The byte array containing the Integerstart - the position in the byte[] we will deserialize the long frompublic java.lang.Long fromBytes(byte[] in)
in - The byte array containing the Longstart - the position in the byte[] we will deserialize the long frompublic java.lang.Long fromBytes(byte[] in,
int start)
in - The byte array containing the Integerstart - the position in the byte[] we will deserialize the long frompublic java.lang.Long deserialize(BufferHandler bufferHandler) throws java.io.IOException
bufferHandler - The incoming bufferHandlerjava.io.IOException - If the deserialization failedpublic java.lang.Long deserialize(java.nio.ByteBuffer buffer)
throws java.io.IOException
buffer - The incoming ByteBufferjava.io.IOException - If the deserialization failed