public class CharacterSerializer extends Object implements OrderPreservingSerializer<Character>
Constructor and Description |
---|
CharacterSerializer() |
Modifier and Type | Method and Description |
---|---|
static short |
char2short(char c) |
Character |
convert(Object value)
Converts the given (not-null) value to the expected datatype V.
|
Character |
read(ScanBuffer buffer)
Reads an attribute from the given ReadBuffer.
|
Character |
readByteOrder(ScanBuffer buffer)
Reads an attribute from the given ReadBuffer assuming it was written in byte order.
|
static char |
short2char(short s) |
void |
write(WriteBuffer out,
Character attribute)
Writes the attribute value to the given WriteBuffer.
|
void |
writeByteOrder(WriteBuffer buffer,
Character 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 Character read(ScanBuffer buffer)
AttributeSerializer
read
in interface AttributeSerializer<Character>
buffer
- ReadBuffer to read attribute frompublic void write(WriteBuffer out, Character attribute)
AttributeSerializer
write
in interface AttributeSerializer<Character>
out
- WriteBuffer to write attribute toattribute
- Attribute to write to WriteBufferpublic Character readByteOrder(ScanBuffer buffer)
OrderPreservingSerializer
readByteOrder
in interface OrderPreservingSerializer<Character>
buffer
- ReadBuffer to read attribute frompublic void writeByteOrder(WriteBuffer buffer, Character attribute)
OrderPreservingSerializer
writeByteOrder
in interface OrderPreservingSerializer<Character>
buffer
- WriteBuffer to write attribute toattribute
- Attribute to write to WriteBufferpublic static final short char2short(char c)
public static final char short2char(short s)
public Character convert(Object value)
AttributeSerializer
IllegalArgumentException
if it cannot be converted.convert
in interface AttributeSerializer<Character>
value
- to convertCopyright © 2012–2017. All rights reserved.