public class LongArraySerializer extends AbstractElementSerializer<long[]>
Modifier and Type | Field and Description |
---|---|
static LongArraySerializer |
INSTANCE
A static instance of a LongArraySerializer
|
Modifier and Type | Method and Description |
---|---|
int |
compare(long[] type1,
long[] type2)
Returns the comparison of two types.
|
long[] |
deserialize(BufferHandler bufferHandler)
Deserialize an element from a BufferHandler
|
long[] |
deserialize(ByteBuffer buffer)
Deserialize an element from a ByteBuffer
|
long[] |
fromBytes(byte[] buffer)
Deserialize an element from a byte[]
|
long[] |
fromBytes(byte[] buffer,
int pos)
Deserialize an element from a byte[]
|
byte[] |
serialize(long[] element)
Produce the byte[] representation of the element
|
getComparator, getType
public static final LongArraySerializer INSTANCE
public byte[] serialize(long[] element)
element
- The element to serializepublic 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 failedpublic int compare(long[] type1, long[] type2)
compare
in interface ElementSerializer<long[]>
compare
in class AbstractElementSerializer<long[]>
type1
- The first type to comparetype2
- The second type to comparepublic long[] fromBytes(byte[] buffer) throws IOException
ElementSerializer
buffer
- The incoming byte[]IOException
- If the deserialization failedpublic long[] fromBytes(byte[] buffer, int pos) throws IOException
ElementSerializer
buffer
- The incoming byte[]IOException
- If the deserialization failedCopyright © 2012–2015 Apache Mavibot Project Parent. All rights reserved.