|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.io.Reader
java.io.BufferedReader
biweekly.io.text.FoldedLineReader
public class FoldedLineReader
Automatically unfolds lines of text as they are read.
| Field Summary |
|---|
| Fields inherited from class java.io.Reader |
|---|
lock |
| Constructor Summary | |
|---|---|
FoldedLineReader(Reader reader)
Creates a new folded line reader. |
|
FoldedLineReader(String text)
Creates a new folded line reader. |
|
| Method Summary | |
|---|---|
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 line, unfolding it if necessary. |
void |
setSingleSpaceFoldingEnabled(boolean enabled)
Sets whether the reader will only ignore the first whitespace character it encounters at the beginning of a folded line. |
| Methods inherited from class java.io.BufferedReader |
|---|
close, mark, markSupported, read, read, ready, reset, skip |
| Methods inherited from class java.io.Reader |
|---|
read, read |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public FoldedLineReader(Reader reader)
reader - the reader object to wrappublic FoldedLineReader(String text)
text - the text to read| Method Detail |
|---|
public void setSingleSpaceFoldingEnabled(boolean enabled)
enabled - true to enable (default), false to disablepublic boolean isSingleSpaceFoldingEnabled()
public int getLineNum()
public String readLine()
throws IOException
readLine in class BufferedReaderIOException - if there's a problem reading from the reader
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||