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