public class FoldedLineReader extends BufferedReader
Constructor and Description |
---|
FoldedLineReader(Reader reader)
Creates a folded line reader.
|
FoldedLineReader(String text)
Creates a folded line reader.
|
Modifier and Type | Method and Description |
---|---|
Charset |
getEncoding()
Gets the character encoding of the reader.
|
int |
getLineNum()
Gets the starting line number of the last unfolded line that was read.
|
boolean |
isSingleSpaceFoldingEnabled()
Gets whether the reader will only ignore the first whitespace character
it encounters at the beginning of a folded line.
|
String |
readLine()
Reads the next unfolded line.
|
void |
setSingleSpaceFoldingEnabled(boolean enabled)
Sets whether the reader will only ignore the first whitespace character
it encounters at the beginning of a folded line.
|
close, mark, markSupported, read, read, ready, reset, skip
public FoldedLineReader(Reader reader)
reader
- the reader object to wrappublic FoldedLineReader(String text)
text
- the text to readpublic void setSingleSpaceFoldingEnabled(boolean enabled)
enabled
- true to enable (default), false to disablepublic boolean isSingleSpaceFoldingEnabled()
public int getLineNum()
public Charset getEncoding()
public String readLine() throws IOException
readLine
in class BufferedReader
IOException
- if there's a problem reading from the readerCopyright © 2013-2015 Michael Angstadt. All Rights Reserved.