public interface DataSerializer<T>
| Modifier and Type | Method and Description |
|---|---|
T |
deserialize(DataInput input,
int availableBytes)
Deserializes the bytes pointed by
input. |
void |
serialize(DataOutput output,
T t)
Serializes an object to a data stream.
|
void serialize(DataOutput output, T t) throws IOException
output - the data streamt - the object to serializeIOException - exceptionT deserialize(DataInput input, int availableBytes) throws IOException
input.input - input data to read fromavailableBytes - the number of bytes available. 0 would correspond to a null
object, -1 is EOF.IOException - exceptionCopyright © 2013–2016. All rights reserved.