public class EnumSerializer<E extends Enum> extends Object implements OrderPreservingSerializer<E>
| Constructor and Description |
|---|
EnumSerializer(Class<E> datatype) |
| Modifier and Type | Method and Description |
|---|---|
E |
read(ScanBuffer buffer)
Reads an attribute from the given ReadBuffer.
|
E |
readByteOrder(ScanBuffer buffer)
Reads an attribute from the given ReadBuffer assuming it was written in byte order.
|
void |
write(WriteBuffer out,
E object)
Writes the attribute value to the given WriteBuffer.
|
void |
writeByteOrder(WriteBuffer buffer,
E 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, waitconvert, verifyAttributepublic E read(ScanBuffer buffer)
AttributeSerializerread in interface AttributeSerializer<E extends Enum>buffer - ReadBuffer to read attribute frompublic void write(WriteBuffer out, E object)
AttributeSerializerwrite in interface AttributeSerializer<E extends Enum>out - WriteBuffer to write attribute toobject - Attribute to write to WriteBufferpublic E readByteOrder(ScanBuffer buffer)
OrderPreservingSerializerreadByteOrder in interface OrderPreservingSerializer<E extends Enum>buffer - ReadBuffer to read attribute frompublic void writeByteOrder(WriteBuffer buffer, E attribute)
OrderPreservingSerializerwriteByteOrder in interface OrderPreservingSerializer<E extends Enum>buffer - WriteBuffer to write attribute toattribute - Attribute to write to WriteBufferCopyright © 2012–2015. All rights reserved.