public class CharSerializer extends AbstractElementSerializer<Character>
Modifier and Type | Field and Description |
---|---|
static CharSerializer |
INSTANCE
A static instance of a CharSerializer
|
Modifier and Type | Method and Description |
---|---|
Character |
deserialize(BufferHandler bufferHandler)
Deserialize an element from a BufferHandler
|
static Character |
deserialize(byte[] in)
A static method used to deserialize a Character from a byte array.
|
static Character |
deserialize(byte[] in,
int start)
A static method used to deserialize a Character from a byte array.
|
Character |
deserialize(ByteBuffer buffer)
Deserialize an element from a ByteBuffer
|
Character |
fromBytes(byte[] in)
A method used to deserialize a Character from a byte array.
|
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(Character element)
Produce the byte[] representation of the element
|
compare, getComparator, getType
public static final CharSerializer INSTANCE
public byte[] serialize(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 Character deserialize(byte[] in)
in
- The byte array containing the Characterpublic static Character deserialize(byte[] in, int start)
in
- The byte array containing the Characterstart
- the position in the byte[] we will deserialize the char frompublic Character fromBytes(byte[] in)
in
- The byte array containing the Characterpublic Character fromBytes(byte[] in, int start)
in
- The byte array containing the Characterstart
- the position in the byte[] we will deserialize the char frompublic Character deserialize(ByteBuffer buffer) throws IOException
buffer
- The incoming ByteBufferIOException
- If the deserialization failedpublic Character deserialize(BufferHandler bufferHandler) throws IOException
bufferHandler
- The incoming bufferHandlerIOException
- If the deserialization failedCopyright © 2012–2015 Apache Mavibot Project Parent. All rights reserved.