public abstract class Record extends Object implements WritableComparable, Cloneable
| 构造器和说明 |
|---|
Record() |
| 限定符和类型 | 方法和说明 |
|---|---|
abstract int |
compareTo(Object peer) |
void |
deserialize(RecordInput rin)
Deserialize a record without a tag
|
abstract void |
deserialize(RecordInput rin,
String tag)
Deserialize a record with a tag (usually field name)
|
void |
readFields(DataInput din)
Deserialize the fields of this object from
in. |
void |
serialize(RecordOutput rout)
Serialize a record without a tag
|
abstract void |
serialize(RecordOutput rout,
String tag)
Serialize a record with tag (ususally field name)
|
String |
toString() |
void |
write(DataOutput out)
Serialize the fields of this object to
out. |
public abstract void serialize(RecordOutput rout, String tag) throws IOException
rout - Record output destinationtag - record tag (Used only in tagged serialization e.g. XML)IOExceptionpublic abstract void deserialize(RecordInput rin, String tag) throws IOException
rin - Record input sourcetag - Record tag (Used only in tagged serialization e.g. XML)IOExceptionpublic abstract int compareTo(Object peer) throws ClassCastException
compareTo 在接口中 ComparableClassCastExceptionpublic void serialize(RecordOutput rout) throws IOException
rout - Record output destinationIOExceptionpublic void deserialize(RecordInput rin) throws IOException
rin - Record input sourceIOExceptionpublic void write(DataOutput out) throws IOException
Writableout.write 在接口中 Writableout - DataOuput to serialize this object into.IOExceptionpublic void readFields(DataInput din) throws IOException
Writablein.
For efficiency, implementations should attempt to re-use storage in the existing object where possible.
readFields 在接口中 Writabledin - DataInput to deseriablize this object from.IOExceptionCopyright © 2009 The Apache Software Foundation