T - the type of enumpublic abstract class MessageEnumSerializer<T extends MessageEnum> extends ValueSerializer<T>
| Constructor and Description |
|---|
MessageEnumSerializer() |
| Modifier and Type | Method and Description |
|---|---|
abstract T |
from(int value)
Creates the enum from the specified integer value.
|
abstract T |
from(String name)
Creates the enum from the specified string
|
T |
read(ValueReader reader)
Parses a message from the specified reader
|
void |
write(T value,
ValueWriter writer) |
listOf, mappingTo, setOf, writepublic abstract T from(int value) throws IOException
value - the integer value to create the enum fromIOExceptionpublic abstract T from(String name) throws IOException
name - the string value of this enumIOExceptionpublic final T read(ValueReader reader) throws IOException
read in class ValueSerializer<T extends MessageEnum>reader - the serializer to create the fromIOException - if the message could not be readpublic final void write(T value, ValueWriter writer) throws IOException
write in class ValueSerializer<T extends MessageEnum>IOExceptionCopyright © 2012–2015 Danish Maritime Authority. All rights reserved.