T
- The type that this adapter can convertpublic abstract class TypeAdapter<T>
extends java.lang.Object
Another feature is the ability to convert between objects and their representation in the form of key-value pairs.
Constructor and Description |
---|
TypeAdapter() |
Modifier and Type | Method and Description |
---|---|
abstract T |
deserialize(ProtocolReader reader)
Deserializes binary data from a ProtocolReader to a concrete java data type
|
abstract void |
serialize(ProtocolWriter writer,
T value)
Serializes data from an object and writes it to a ProtocolWriter
|
public abstract T deserialize(ProtocolReader reader) throws java.io.IOException
reader
- A ProtocolReader to read the datajava.io.IOException
- on failed IO operationspublic abstract void serialize(ProtocolWriter writer, T value) throws java.io.IOException
writer
- A ProtocolWriter to write the datavalue
- A concrete java implementation of the data type to be serializedjava.io.IOException
- on failed IO operations