public interface DataSerializer<T>
| Modifier and Type | Method and Description |
|---|---|
T |
deserialize(DataInput input)
Deserializes the bytes pointed by
input. |
void |
serialize(DataOutput output,
T t)
Serializes an object to a data stream.
|
int |
size()
Returns the serialized length if constant other wise returns 0 to
indicate variable length (which may force more copying in memory and be a
bit slower).
|
void serialize(DataOutput output, T t) throws IOException
output - the data streamt - the object to serializeIOException - exceptionT deserialize(DataInput input) throws IOException
input.input - input data to read fromIOException - exceptionint size()
Copyright © 2013–2016. All rights reserved.