public class BasicInputParser extends AbstractInputParser
Constructor and Description |
---|
BasicInputParser(boolean treatGroupedDelimitersAsOne,
java.io.File... files)
Constructor.
|
BasicInputParser(boolean treatGroupedDelimitersAsOne,
java.io.InputStream... inputStreams)
Constructor.
|
BasicInputParser(boolean treatGroupedDelimitersAsOne,
int wordCount,
java.io.File... files)
Constructor.
|
BasicInputParser(boolean treatGroupedDelimitersAsOne,
int wordCount,
java.io.InputStream... inputStreams) |
Modifier and Type | Method and Description |
---|---|
protected void |
advanceFile() |
void |
close()
Closes the underlying stream
|
java.lang.String |
getCurrentLine()
Provides access to the current (just parsed) line in pre-parsed format.
|
int |
getCurrentLineNumber()
NOTE: Because AbstractInputParser pre-fetches the next line, this method actually returns the
next line, not the most recent line returned by next().
|
java.lang.String |
getFileName()
Gets the name of the file being parsed
|
protected byte[] |
readNextLine()
Workhorse method that reads the next line from the underlying reader
|
advance, calculateWordCount, getWordCount, isBlank, isComment, isDelimiter, isSkipBlankLines, isTreatGroupedDelimitersAsOne, iterator, setSkipBlankLines, setTreatGroupedDelimitersAsOne, setWordCount
hasNext, isIterating, next, peek, remove
public BasicInputParser(boolean treatGroupedDelimitersAsOne, java.io.InputStream... inputStreams)
inputStreams
- the file(s) to parse, in orderpublic BasicInputParser(boolean treatGroupedDelimitersAsOne, int wordCount, java.io.InputStream... inputStreams)
public BasicInputParser(boolean treatGroupedDelimitersAsOne, java.io.File... files)
files
- the file(s) to parse, in orderpublic BasicInputParser(boolean treatGroupedDelimitersAsOne, int wordCount, java.io.File... files)
files
- the file(s) to parsewordCount
- number of whitespace-separated "words" per lineprotected byte[] readNextLine()
readNextLine
in class AbstractInputParser
protected void advanceFile()
public void close()
close
in interface htsjdk.samtools.util.CloseableIterator<java.lang.String[]>
close
in interface java.io.Closeable
close
in interface java.lang.AutoCloseable
close
in class AbstractInputParser
public java.lang.String getFileName()
getFileName
in class AbstractInputParser
public java.lang.String getCurrentLine()
public int getCurrentLineNumber()