org.apache.hadoop.io
Interface Writable

All Known Subinterfaces:
WritableComparable
All Known Implementing Classes:
ArrayWritable, BooleanWritable, BytesWritable, CompressedWritable, Content, CrawlDatum, FetcherOutput, FloatWritable, GenericWritable, IntWritable, LongWritable, MapWritable, MD5Hash, Metadata, MetaWrapper, NullWritable, ObjectWritable, Outlink, ParseData, ParseImpl, ParseStatus, ParseText, ProtocolStatus, SpellCheckedMetadata, Text, TwoDArrayWritable, VersionedWritable, VIntWritable, VLongWritable

public interface Writable

A simple, efficient, serialization protocol, based on DataInput and DataOutput.

Implementations typically implement a static read(DataInput) method which constructs a new instance, calls readFields(DataInput), and returns the instance.

Author:
Doug Cutting

Method Summary
 void readFields(DataInput in)
          Reads the fields of this object from in.
 void write(DataOutput out)
          Writes the fields of this object to out.
 

Method Detail

write

void write(DataOutput out)
           throws IOException
Writes the fields of this object to out.

Throws:
IOException

readFields

void readFields(DataInput in)
                throws IOException
Reads the fields of this object from in. For efficiency, implementations should attempt to re-use storage in the existing object where possible.

Throws:
IOException


Copyright © 2007, 2012, Oracle and/or its affiliates. All rights reserved.