org.apache.hadoop.record
Class CsvRecordInput

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

public class CsvRecordInput
extends Object
implements RecordInput


Constructor Summary
CsvRecordInput(InputStream in)
          Creates a new instance of CsvRecordInput
 
Method Summary
 void endMap(String tag)
          Check the mark for end of the serialized map.
 void endRecord(String tag)
          Check the mark for end of the serialized record.
 void endVector(String tag)
          Check the mark for end of the serialized vector.
 boolean readBool(String tag)
          Read a boolean from serialized record.
 Buffer readBuffer(String tag)
          Read byte array from serialized record.
 byte readByte(String tag)
          Read a byte from serialized record.
 double readDouble(String tag)
          Read a double-precision number from serialized record.
 float readFloat(String tag)
          Read a single-precision float from serialized record.
 int readInt(String tag)
          Read an integer from serialized record.
 long readLong(String tag)
          Read a long integer from serialized record.
 String readString(String tag)
          Read a UTF-8 encoded string from serialized record.
 Index startMap(String tag)
          Check the mark for start of the serialized map.
 void startRecord(String tag)
          Check the mark for start of the serialized record.
 Index startVector(String tag)
          Check the mark for start of the serialized vector.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CsvRecordInput

public CsvRecordInput(InputStream in)
Creates a new instance of CsvRecordInput

Method Detail

readByte

public byte readByte(String tag)
              throws IOException
Description copied from interface: RecordInput
Read a byte from serialized record.

Specified by:
readByte in interface RecordInput
Parameters:
tag - Used by tagged serialization formats (such as XML)
Returns:
value read from serialized record.
Throws:
IOException

readBool

public boolean readBool(String tag)
                 throws IOException
Description copied from interface: RecordInput
Read a boolean from serialized record.

Specified by:
readBool in interface RecordInput
Parameters:
tag - Used by tagged serialization formats (such as XML)
Returns:
value read from serialized record.
Throws:
IOException

readInt

public int readInt(String tag)
            throws IOException
Description copied from interface: RecordInput
Read an integer from serialized record.

Specified by:
readInt in interface RecordInput
Parameters:
tag - Used by tagged serialization formats (such as XML)
Returns:
value read from serialized record.
Throws:
IOException

readLong

public long readLong(String tag)
              throws IOException
Description copied from interface: RecordInput
Read a long integer from serialized record.

Specified by:
readLong in interface RecordInput
Parameters:
tag - Used by tagged serialization formats (such as XML)
Returns:
value read from serialized record.
Throws:
IOException

readFloat

public float readFloat(String tag)
                throws IOException
Description copied from interface: RecordInput
Read a single-precision float from serialized record.

Specified by:
readFloat in interface RecordInput
Parameters:
tag - Used by tagged serialization formats (such as XML)
Returns:
value read from serialized record.
Throws:
IOException

readDouble

public double readDouble(String tag)
                  throws IOException
Description copied from interface: RecordInput
Read a double-precision number from serialized record.

Specified by:
readDouble in interface RecordInput
Parameters:
tag - Used by tagged serialization formats (such as XML)
Returns:
value read from serialized record.
Throws:
IOException

readString

public String readString(String tag)
                  throws IOException
Description copied from interface: RecordInput
Read a UTF-8 encoded string from serialized record.

Specified by:
readString in interface RecordInput
Parameters:
tag - Used by tagged serialization formats (such as XML)
Returns:
value read from serialized record.
Throws:
IOException

readBuffer

public Buffer readBuffer(String tag)
                  throws IOException
Description copied from interface: RecordInput
Read byte array from serialized record.

Specified by:
readBuffer in interface RecordInput
Parameters:
tag - Used by tagged serialization formats (such as XML)
Returns:
value read from serialized record.
Throws:
IOException

startRecord

public void startRecord(String tag)
                 throws IOException
Description copied from interface: RecordInput
Check the mark for start of the serialized record.

Specified by:
startRecord in interface RecordInput
Parameters:
tag - Used by tagged serialization formats (such as XML)
Throws:
IOException

endRecord

public void endRecord(String tag)
               throws IOException
Description copied from interface: RecordInput
Check the mark for end of the serialized record.

Specified by:
endRecord in interface RecordInput
Parameters:
tag - Used by tagged serialization formats (such as XML)
Throws:
IOException

startVector

public Index startVector(String tag)
                  throws IOException
Description copied from interface: RecordInput
Check the mark for start of the serialized vector.

Specified by:
startVector in interface RecordInput
Parameters:
tag - Used by tagged serialization formats (such as XML)
Returns:
Index that is used to count the number of elements.
Throws:
IOException

endVector

public void endVector(String tag)
               throws IOException
Description copied from interface: RecordInput
Check the mark for end of the serialized vector.

Specified by:
endVector in interface RecordInput
Parameters:
tag - Used by tagged serialization formats (such as XML)
Throws:
IOException

startMap

public Index startMap(String tag)
               throws IOException
Description copied from interface: RecordInput
Check the mark for start of the serialized map.

Specified by:
startMap in interface RecordInput
Parameters:
tag - Used by tagged serialization formats (such as XML)
Returns:
Index that is used to count the number of map entries.
Throws:
IOException

endMap

public void endMap(String tag)
            throws IOException
Description copied from interface: RecordInput
Check the mark for end of the serialized map.

Specified by:
endMap in interface RecordInput
Parameters:
tag - Used by tagged serialization formats (such as XML)
Throws:
IOException


Copyright © 2009 The Apache Software Foundation