com.nhncorp.neptune.common.util
Class NeptuneLineReader
java.lang.Object
com.nhncorp.neptune.common.util.NeptuneLineReader
public class NeptuneLineReader
- extends java.lang.Object
|
Constructor Summary |
NeptuneLineReader(java.io.InputStream in)
|
NeptuneLineReader(java.io.InputStream in,
int bufferSize)
Create a line reader that reads from the given stream using the given
buffer-size. |
|
Method Summary |
void |
close()
Close the underlying stream. |
int |
readLine(org.apache.hadoop.io.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 |
NeptuneLineReader
public NeptuneLineReader(java.io.InputStream in,
int bufferSize)
- Create a line reader that reads from the given stream using the given
buffer-size.
- Parameters:
in -
- Throws:
java.io.IOException
NeptuneLineReader
public NeptuneLineReader(java.io.InputStream in)
close
public void close()
throws java.io.IOException
- Close the underlying stream.
- Throws:
java.io.IOException
readLine
public int readLine(org.apache.hadoop.io.Text str)
throws java.io.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:
java.io.IOException - if the underlying stream throws