public class BooleanSerializer extends Object implements OrderPreservingSerializer<Boolean>
Constructor and Description |
---|
BooleanSerializer() |
Modifier and Type | Method and Description |
---|---|
Boolean |
convert(Object value)
Converts the given (not-null) value to the expected datatype V.
|
static boolean |
decode(byte b) |
static byte |
encode(boolean b) |
Boolean |
read(ScanBuffer buffer)
Reads an attribute from the given ReadBuffer.
|
Boolean |
readByteOrder(ScanBuffer buffer)
Reads an attribute from the given ReadBuffer assuming it was written in byte order.
|
void |
write(WriteBuffer out,
Boolean attribute)
Writes the attribute value to the given WriteBuffer.
|
void |
writeByteOrder(WriteBuffer buffer,
Boolean attribute)
Writes the attribute value to the given WriteBuffer such that the byte order of the result is equal to the
natural order of the attribute.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
verifyAttribute
public Boolean read(ScanBuffer buffer)
AttributeSerializer
read
in interface AttributeSerializer<Boolean>
buffer
- ReadBuffer to read attribute frompublic void write(WriteBuffer out, Boolean attribute)
AttributeSerializer
write
in interface AttributeSerializer<Boolean>
out
- WriteBuffer to write attribute toattribute
- Attribute to write to WriteBufferpublic Boolean readByteOrder(ScanBuffer buffer)
OrderPreservingSerializer
readByteOrder
in interface OrderPreservingSerializer<Boolean>
buffer
- ReadBuffer to read attribute frompublic void writeByteOrder(WriteBuffer buffer, Boolean attribute)
OrderPreservingSerializer
writeByteOrder
in interface OrderPreservingSerializer<Boolean>
buffer
- WriteBuffer to write attribute toattribute
- Attribute to write to WriteBufferpublic Boolean convert(Object value)
AttributeSerializer
IllegalArgumentException
if it cannot be converted.convert
in interface AttributeSerializer<Boolean>
value
- to convertpublic static boolean decode(byte b)
public static byte encode(boolean b)
Copyright © 2012–2017. All rights reserved.