org.apache.hadoop.typedbytes
Class TypedBytesRecordInput

java.lang.Object
  extended by org.apache.hadoop.typedbytes.TypedBytesRecordInput
All Implemented Interfaces:
org.apache.hadoop.record.RecordInput

public class TypedBytesRecordInput
extends Object
implements org.apache.hadoop.record.RecordInput

Serializer for records that writes typed bytes.


Constructor Summary
TypedBytesRecordInput(DataInput in)
          Creates a new instance of TypedBytesRecordInput.
TypedBytesRecordInput(TypedBytesInput in)
          Creates a new instance of TypedBytesRecordInput.
 
Method Summary
 void endMap(String tag)
           
 void endRecord(String tag)
           
 void endVector(String tag)
           
static TypedBytesRecordInput get(DataInput in)
          Get a thread-local typed bytes record input for the supplied DataInput.
static TypedBytesRecordInput get(TypedBytesInput in)
          Get a thread-local typed bytes record input for the supplied TypedBytesInput.
 boolean readBool(String tag)
           
 org.apache.hadoop.record.Buffer readBuffer(String tag)
           
 byte readByte(String tag)
           
 double readDouble(String tag)
           
 float readFloat(String tag)
           
 int readInt(String tag)
           
 long readLong(String tag)
           
 String readString(String tag)
           
 org.apache.hadoop.record.Index startMap(String tag)
           
 void startRecord(String tag)
           
 org.apache.hadoop.record.Index startVector(String tag)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TypedBytesRecordInput

public TypedBytesRecordInput(TypedBytesInput in)
Creates a new instance of TypedBytesRecordInput.


TypedBytesRecordInput

public TypedBytesRecordInput(DataInput in)
Creates a new instance of TypedBytesRecordInput.

Method Detail

get

public static TypedBytesRecordInput get(TypedBytesInput in)
Get a thread-local typed bytes record input for the supplied TypedBytesInput.

Parameters:
in - typed bytes input object
Returns:
typed bytes record input corresponding to the supplied TypedBytesInput.

get

public static TypedBytesRecordInput get(DataInput in)
Get a thread-local typed bytes record input for the supplied DataInput.

Parameters:
in - data input object
Returns:
typed bytes record input corresponding to the supplied DataInput.

readBool

public boolean readBool(String tag)
                 throws IOException
Specified by:
readBool in interface org.apache.hadoop.record.RecordInput
Throws:
IOException

readBuffer

public org.apache.hadoop.record.Buffer readBuffer(String tag)
                                           throws IOException
Specified by:
readBuffer in interface org.apache.hadoop.record.RecordInput
Throws:
IOException

readByte

public byte readByte(String tag)
              throws IOException
Specified by:
readByte in interface org.apache.hadoop.record.RecordInput
Throws:
IOException

readDouble

public double readDouble(String tag)
                  throws IOException
Specified by:
readDouble in interface org.apache.hadoop.record.RecordInput
Throws:
IOException

readFloat

public float readFloat(String tag)
                throws IOException
Specified by:
readFloat in interface org.apache.hadoop.record.RecordInput
Throws:
IOException

readInt

public int readInt(String tag)
            throws IOException
Specified by:
readInt in interface org.apache.hadoop.record.RecordInput
Throws:
IOException

readLong

public long readLong(String tag)
              throws IOException
Specified by:
readLong in interface org.apache.hadoop.record.RecordInput
Throws:
IOException

readString

public String readString(String tag)
                  throws IOException
Specified by:
readString in interface org.apache.hadoop.record.RecordInput
Throws:
IOException

startRecord

public void startRecord(String tag)
                 throws IOException
Specified by:
startRecord in interface org.apache.hadoop.record.RecordInput
Throws:
IOException

startVector

public org.apache.hadoop.record.Index startVector(String tag)
                                           throws IOException
Specified by:
startVector in interface org.apache.hadoop.record.RecordInput
Throws:
IOException

startMap

public org.apache.hadoop.record.Index startMap(String tag)
                                        throws IOException
Specified by:
startMap in interface org.apache.hadoop.record.RecordInput
Throws:
IOException

endRecord

public void endRecord(String tag)
               throws IOException
Specified by:
endRecord in interface org.apache.hadoop.record.RecordInput
Throws:
IOException

endVector

public void endVector(String tag)
               throws IOException
Specified by:
endVector in interface org.apache.hadoop.record.RecordInput
Throws:
IOException

endMap

public void endMap(String tag)
            throws IOException
Specified by:
endMap in interface org.apache.hadoop.record.RecordInput
Throws:
IOException


Copyright © 2009 The Apache Software Foundation