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