edu.umd.cloud9.io
Class FSLineReader

java.lang.Object
  extended by edu.umd.cloud9.io.FSLineReader

public class FSLineReader
extends Object

Copied from LineRecordReader.LineReader in Hadoop 0.17.2 release.


Constructor Summary
FSLineReader(InputStream in, int bufferSize)
          Create a line reader that reads from the given stream using the given buffer-size.
FSLineReader(Path path)
           
FSLineReader(Path file, FileSystem fs)
           
FSLineReader(String file)
           
FSLineReader(String file, FileSystem fs)
           
 
Method Summary
 void close()
          Close the underlying stream.
 int readLine(Text str)
          Read from the InputStream into the given Text.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FSLineReader

public FSLineReader(InputStream in,
                    int bufferSize)
Create a line reader that reads from the given stream using the given buffer-size.

Parameters:
in -
Throws:
IOException

FSLineReader

public FSLineReader(Path path)
             throws IOException
Throws:
IOException

FSLineReader

public FSLineReader(String file)
             throws IOException
Throws:
IOException

FSLineReader

public FSLineReader(String file,
                    FileSystem fs)
             throws IOException
Throws:
IOException

FSLineReader

public FSLineReader(Path file,
                    FileSystem fs)
             throws IOException
Throws:
IOException
Method Detail

close

public void close()
           throws IOException
Close the underlying stream.

Throws:
IOException

readLine

public int readLine(Text str)
             throws IOException
Read from the InputStream into the given Text.

Parameters:
str - the object to store the given line
Returns:
the number of bytes read including the newline
Throws:
IOException - if the underlying stream throws