public interface Writable
DataInput
and
DataOutput
.
Implementations typically implement a static read(DataInput)
method which constructs a new instance, calls readFields(DataInput)
, and returns the instance.
Modifier and Type | Method and Description |
---|---|
void |
readFields(DataInput in)
Reads the fields of this object from
in . |
void |
write(DataOutput out)
Writes the fields of this object to
out . |
void write(DataOutput out) throws IOException
out
.IOException
void readFields(DataInput in) throws IOException
in
. For efficiency,
implementations should attempt to re-use storage in the existing object
where possible.IOException
Copyright © 2007, 2017, Oracle and/or its affiliates. All rights reserved.