public class CharSerializer extends AbstractElementSerializer<java.lang.Character>
| Modifier and Type | Field and Description |
|---|---|
static CharSerializer |
INSTANCE
A static instance of a CharSerializer
|
| Modifier | Constructor and Description |
|---|---|
private |
CharSerializer()
Create a new instance of CharSerializer
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.Character |
deserialize(BufferHandler bufferHandler)
Deserialize an element from a BufferHandler
|
static java.lang.Character |
deserialize(byte[] in)
A static method used to deserialize a Character from a byte array.
|
static java.lang.Character |
deserialize(byte[] in,
int start)
A static method used to deserialize a Character from a byte array.
|
java.lang.Character |
deserialize(java.nio.ByteBuffer buffer)
Deserialize an element from a ByteBuffer
|
java.lang.Character |
fromBytes(byte[] in)
A method used to deserialize a Character from a byte array.
|
java.lang.Character |
fromBytes(byte[] in,
int start)
A static method used to deserialize a Character from a byte array.
|
static byte[] |
serialize(byte[] buffer,
int start,
char value)
Serialize a char
|
static byte[] |
serialize(char value)
Serialize a char
|
byte[] |
serialize(java.lang.Character element)
Produce the byte[] representation of the element
|
compare, getComparator, getTypepublic static final CharSerializer INSTANCE
public byte[] serialize(java.lang.Character element)
element - The element to serializepublic static byte[] serialize(char value)
value - the value to serializepublic static byte[] serialize(byte[] buffer,
int start,
char value)
buffer - the Buffer that will contain the serialized valuestart - the position in the buffer we will store the serialized charvalue - the value to serializepublic static java.lang.Character deserialize(byte[] in)
in - The byte array containing the Characterpublic static java.lang.Character deserialize(byte[] in,
int start)
in - The byte array containing the Characterstart - the position in the byte[] we will deserialize the char frompublic java.lang.Character fromBytes(byte[] in)
in - The byte array containing the Characterpublic java.lang.Character fromBytes(byte[] in,
int start)
in - The byte array containing the Characterstart - the position in the byte[] we will deserialize the char frompublic java.lang.Character deserialize(java.nio.ByteBuffer buffer)
throws java.io.IOException
buffer - The incoming ByteBufferjava.io.IOException - If the deserialization failedpublic java.lang.Character deserialize(BufferHandler bufferHandler) throws java.io.IOException
bufferHandler - The incoming bufferHandlerjava.io.IOException - If the deserialization failed