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