public class ShortSerializer extends Object implements OrderPreservingSerializer<Short>
| Constructor and Description |
|---|
ShortSerializer() |
| Modifier and Type | Method and Description |
|---|---|
Short |
convert(Object value)
Converts the given (not-null) value to the expected datatype V.
|
Short |
read(ScanBuffer buffer)
Reads an attribute from the given ReadBuffer.
|
Short |
readByteOrder(ScanBuffer buffer)
Reads an attribute from the given ReadBuffer assuming it was written in byte order.
|
void |
verifyAttribute(Short value)
Verifies the given (not-null) attribute value is valid.
|
void |
write(WriteBuffer out,
Short object)
Writes the attribute value to the given WriteBuffer.
|
void |
writeByteOrder(WriteBuffer buffer,
Short 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 Short read(ScanBuffer buffer)
AttributeSerializerread in interface AttributeSerializer<Short>buffer - ReadBuffer to read attribute frompublic void write(WriteBuffer out, Short object)
AttributeSerializerwrite in interface AttributeSerializer<Short>out - WriteBuffer to write attribute toobject - Attribute to write to WriteBufferpublic Short readByteOrder(ScanBuffer buffer)
OrderPreservingSerializerreadByteOrder in interface OrderPreservingSerializer<Short>buffer - ReadBuffer to read attribute frompublic void writeByteOrder(WriteBuffer buffer, Short attribute)
OrderPreservingSerializerwriteByteOrder in interface OrderPreservingSerializer<Short>buffer - WriteBuffer to write attribute toattribute - Attribute to write to WriteBufferpublic void verifyAttribute(Short value)
AttributeHandlerIllegalArgumentException if the value is invalid,
otherwise simply returns.verifyAttribute in interface AttributeHandler<Short>value - to verifypublic Short convert(Object value)
AttributeHandlerIllegalArgumentException if it cannot be converted.convert in interface AttributeHandler<Short>value - to convertCopyright © 2012–2014. All rights reserved.