public class FASTAFileReader extends java.lang.Object
| Constructor and Description |
|---|
FASTAFileReader(java.io.InputStream in)
Create a line reader that reads from the given stream using the default
buffer-size (64k).
|
FASTAFileReader(java.io.InputStream in,
org.apache.hadoop.conf.Configuration conf)
Create a line reader that reads from the given stream using the
io.file.buffer.size specified in the given
Configuration. |
FASTAFileReader(java.io.InputStream in,
int bufferSize)
Create a line reader that reads from the given stream using the given
buffer-size.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Close the underlying stream.
|
int |
readSequence(org.apache.hadoop.io.Text str)
Read from the InputStream into the given Text.
|
int |
readSequence(org.apache.hadoop.io.Text str,
int maxBytesToConsume,
int seqNumber)
Read one line from the InputStream into the given Text.
|
public FASTAFileReader(java.io.InputStream in)
in - The input streamjava.io.IOExceptionpublic FASTAFileReader(java.io.InputStream in, int bufferSize)
in - The input streambufferSize - Size of the read bufferjava.io.IOExceptionpublic FASTAFileReader(java.io.InputStream in, org.apache.hadoop.conf.Configuration conf) throws java.io.IOException
io.file.buffer.size specified in the given
Configuration.in - input streamconf - configurationjava.io.IOExceptionpublic void close() throws java.io.IOException
java.io.IOExceptionpublic int readSequence(org.apache.hadoop.io.Text str, int maxBytesToConsume, int seqNumber) throws java.io.IOException
str - the object to store the given line (without newline)maxBytesToConsume - the maximum number of bytes to consume in this call. This is
only a hint, because if the line cross this threshold, we
allow it to happen. It can overshoot potentially by as much as
one buffer length.seqNumber - sequence number for each key value record. It is read from
configuration file if it is null.java.io.IOException - if the underlying stream throwspublic int readSequence(org.apache.hadoop.io.Text str) throws java.io.IOException
str - the object to store the given linejava.io.IOException - if the underlying stream throws