public interface ValueWriter
| Modifier and Type | Method and Description |
|---|---|
default void |
close() |
default void |
flush() |
MessageFormatType |
getFormatType() |
void |
writeBinary(Binary binary) |
void |
writeBoolean(Boolean value)
Writes a boolean.
|
void |
writeDecimal(BigDecimal value) |
void |
writeDouble(Double value)
Writes a double.
|
void |
writeEnum(MessageEnum serializable) |
void |
writeFloat(Float value)
Writes a float.
|
void |
writeInt(Integer value)
Writes an integer.
|
void |
writeInt64(Long value)
Writes a long.
|
<T> void |
writeList(List<T> list,
ValueSerializer<T> serializer)
Writes a list.
|
<K,V> void |
writeMap(Map<K,V> map,
ValueSerializer<K> keySerializer,
ValueSerializer<V> valueSerializer)
Writes a map.
|
<T extends Message> |
writeMessage(T message,
MessageSerializer<T> serializer)
Writes the specified message if it is non-null.
|
void |
writePosition(Position value) |
void |
writePositionTime(PositionTime value) |
default <T> void |
writeSet(Set<T> set,
ValueSerializer<T> serializer)
Writes a set.
|
void |
writeText(String value)
Writes a string.
|
default void |
writeTimestamp(Timestamp value) |
void |
writeVarInt(BigInteger value) |
MessageFormatType getFormatType()
default void close()
throws IOException
IOExceptiondefault void flush()
throws IOException
IOExceptionvoid writeBinary(Binary binary) throws IOException
IOExceptionvoid writeBoolean(Boolean value) throws IOException
value - the boolean value to writeIOException - If an I/O error occursvoid writeDecimal(BigDecimal value) throws IOException
IOExceptionvoid writeDouble(Double value) throws IOException
value - the double value to writeIOException - If an I/O error occursvoid writeEnum(MessageEnum serializable) throws IOException
IOExceptionvoid writeFloat(Float value) throws IOException
value - the float value to writeIOException - If an I/O error occursvoid writeInt(Integer value) throws IOException
value - the integer value to writeIOException - If an I/O error occursvoid writeInt64(Long value) throws IOException
value - the long value to writeIOException - If an I/O error occurs<T> void writeList(List<T> list, ValueSerializer<T> serializer) throws IOException
T - the type of elementslist - the list to writeserializer - the serializer for each elementIOException - If an I/O error occurs<K,V> void writeMap(Map<K,V> map, ValueSerializer<K> keySerializer, ValueSerializer<V> valueSerializer) throws IOException
K - the type of keys in the mapV - the type of values in the mapmap - the map to writekeySerializer - the serializer for each keyvalueSerializer - the serializer for each valueIOException - If an I/O error occurs<T extends Message> void writeMessage(T message, MessageSerializer<T> serializer) throws IOException
T - the type of messagemessage - the message to writeserializer - the serializer for the messageIOException - If an I/O error occursvoid writePosition(Position value) throws IOException
IOExceptionvoid writePositionTime(PositionTime value) throws IOException
IOExceptiondefault <T> void writeSet(Set<T> set, ValueSerializer<T> serializer) throws IOException
T - the type of elementsset - the set to writeserializer - the serializer for each elementIOException - If an I/O error occursvoid writeText(String value) throws IOException
value - the string value to writeIOException - If an I/O error occursdefault void writeTimestamp(Timestamp value) throws IOException
IOExceptionvoid writeVarInt(BigInteger value) throws IOException
IOExceptionCopyright © 2012–2015 Danish Maritime Authority. All rights reserved.