htsjdk.samtools.util.CloseableIterator<String[]>
, Closeable
, AutoCloseable
, Iterable<String[]>
, Iterator<String[]>
BasicInputParser
public abstract class AbstractInputParser extends htsjdk.samtools.util.AbstractIterator<String[]> implements Iterable<String[]>, htsjdk.samtools.util.CloseableIterator<String[]>
Constructor | Description |
---|---|
AbstractInputParser() |
Modifier and Type | Method | Description |
---|---|---|
protected String[] |
advance() |
|
protected void |
calculateWordCount(byte[] line) |
Calculates the number of delimiter-separated "words" in a line and sets the value of
wordCount |
abstract void |
close() |
Closes this stream and releases any system resources associated with it.
|
abstract String |
getFileName() |
|
protected int |
getWordCount() |
|
protected boolean |
isBlank(byte[] line) |
Determines whether a given line is a comment
|
protected boolean |
isComment(byte[] line) |
Determines whether a given line is a comment
|
protected boolean |
isDelimiter(byte b) |
Determines whether a given character is a delimiter
|
protected boolean |
isSkipBlankLines() |
|
protected boolean |
isTreatGroupedDelimitersAsOne() |
|
Iterator<String[]> |
iterator() |
|
protected abstract byte[] |
readNextLine() |
|
protected void |
setSkipBlankLines(boolean skipBlankLines) |
|
protected void |
setTreatGroupedDelimitersAsOne(boolean treatGroupedDelimitersAsOne) |
|
protected void |
setWordCount(int wordCount) |
hasNext, isIterating, next, peek, remove
forEach, spliterator
forEachRemaining, hasNext, next, remove
public abstract void close()
close
in interface AutoCloseable
close
in interface Closeable
close
in interface htsjdk.samtools.util.CloseableIterator<String[]>
protected abstract byte[] readNextLine()
public abstract String getFileName()
protected String[] advance()
advance
in class htsjdk.samtools.util.AbstractIterator<String[]>
protected void calculateWordCount(byte[] line)
wordCount
line
- representative line from the fileprotected boolean isComment(byte[] line)
line
- the line to evaluateprotected boolean isBlank(byte[] line)
line
- the line to evaluateprotected boolean isDelimiter(byte b)
b
- the character to evaluateb
is a delimiter; otherwise falseprotected int getWordCount()
protected void setWordCount(int wordCount)
protected boolean isTreatGroupedDelimitersAsOne()
protected void setTreatGroupedDelimitersAsOne(boolean treatGroupedDelimitersAsOne)
protected boolean isSkipBlankLines()
protected void setSkipBlankLines(boolean skipBlankLines)