public interface Reader
Modifier and Type | Method and Description |
---|---|
boolean |
advance()
Advance to the next line by discarding the line at the front of the stack
|
int |
getLineno()
Deprecated.
Please use
getLineNumber() |
int |
getLineNumber()
Get the 1-based offset of the current line.
|
boolean |
hasMoreLines()
Check whether there are any lines left to read.
|
boolean |
isNextLineEmpty()
Peek at the next line and check if it's empty (i.e., whitespace only)
This method Does not consume the line from the stack.
|
java.util.List<java.lang.String> |
lines() |
java.lang.String |
peekLine()
Peek at the next line of source data.
|
java.util.List<java.lang.String> |
peekLines(int lineCount)
Peek at the next multiple lines of source data.
|
java.lang.String |
read()
Get the remaining lines of source data joined as a String.
|
java.lang.String |
readLine()
Get the next line of source data.
|
java.util.List<java.lang.String> |
readLines()
Get the remaining lines of source data.
|
void |
restoreLine(java.lang.String line)
Push the String line onto the beginning of the Array of source data.
|
void |
restoreLines(java.util.List<java.lang.String> line)
Push multiple lines onto the beginning of the Array of source data.
|
void |
terminate()
Public: Advance to the end of the reader, consuming all remaining lines
|
int getLineno()
getLineNumber()
int getLineNumber()
boolean hasMoreLines()
boolean isNextLineEmpty()
java.lang.String read()
java.util.List<java.lang.String> readLines()
java.lang.String readLine()
java.util.List<java.lang.String> lines()
void restoreLine(java.lang.String line)
void restoreLines(java.util.List<java.lang.String> line)
java.lang.String peekLine()
java.util.List<java.lang.String> peekLines(int lineCount)
lineCount
- The Integer number of lines to peek.boolean advance()
void terminate()