public interface Streamable
TimeValue
converts the time to nanoseconds for serialization.
Prefer implementing Writeable
over implementing this interface where possible. Lots of code depends on this interface so this
isn't always possible.
Implementers of this interface almost always declare a no arg constructor that is exclusively used for creating "empty" objects on which
you then call readFrom(StreamInput)
. Because readFrom(StreamInput) isn't part of the constructor the fields
on implementers cannot be final. It is these reasons that this interface has fallen out of favor compared to Writeable.Modifier and Type | Method and Description |
---|---|
void |
readFrom(StreamInput in)
Set this object's fields from a StreamInput.
|
void |
writeTo(StreamOutput out)
Write this object's fields to a StreamOutput.
|
void readFrom(StreamInput in) throws java.io.IOException
java.io.IOException
void writeTo(StreamOutput out) throws java.io.IOException
java.io.IOException