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