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