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 |
verifyAttribute(Character value)
Verifies the given (not-null) attribute value is valid.
|
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.
|
public Character read(ScanBuffer buffer)
AttributeSerializerread in interface AttributeSerializer<Character>buffer - ReadBuffer to read attribute frompublic void write(WriteBuffer out, Character attribute)
AttributeSerializerwrite in interface AttributeSerializer<Character>out - WriteBuffer to write attribute toattribute - Attribute to write to WriteBufferpublic Character readByteOrder(ScanBuffer buffer)
OrderPreservingSerializerreadByteOrder in interface OrderPreservingSerializer<Character>buffer - ReadBuffer to read attribute frompublic void writeByteOrder(WriteBuffer buffer, Character attribute)
OrderPreservingSerializerwriteByteOrder 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 void verifyAttribute(Character value)
AttributeHandlerIllegalArgumentException if the value is invalid,
otherwise simply returns.verifyAttribute in interface AttributeHandler<Character>value - to verifypublic Character convert(Object value)
AttributeHandlerIllegalArgumentException if it cannot be converted.convert in interface AttributeHandler<Character>value - to convertCopyright © 2012–2014. All rights reserved.