|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
ObjectStatic
LineReaders
public final class LineReaders
Provides implementations of LineReader.
| utility/geotk-utility (download) | View source code for this class |
| Method Summary | |
|---|---|
static LineReader |
wrap(DataInput input)
Wraps the given DataInput in a LineReader. |
static LineReader |
wrap(Iterable<?> collection)
Wraps the given collection in a LineReader. |
static LineReader |
wrap(Reader reader)
Wraps the given Reader in a LineReader. |
static LineReader |
wrap(String text)
Wraps the given multi-lines text in a LineReader. |
| Methods inherited from class Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static LineReader wrap(String text)
LineReader. Each occurrence of '\r',
'\n' or "\r\n" in the text mark an End Of Line (EOL).
text - The multi-lines text to wrap.
public static LineReader wrap(Iterable<?> collection)
LineReader. Each element will be converted
to a line by a call to Object.toString(). Null elements are not allowed.
If the Iterator implements the Closeable interface, then the
LineReader.close() method will delegate to Iterator.close().
If any RuntimeException is thrown during the iteration and the
exception cause is an instance of
IOException, then the IOException is unwrapped and rethrown
by the LineReader.readLine() method.
collection - The collection to wrap.
public static LineReader wrap(DataInput input)
DataInput in a LineReader. If the given
input is already a LineReader, then it is returned unchanged.
If the DataInput implements the Closeable interface, then the
LineReader.close() method will delegate to DataInput.close().
input - The input to wrap.
public static LineReader wrap(Reader reader)
Reader in a LineReader. If the given
reader is already a LineReader, then it is returned unchanged.
reader - The reader to wrap.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||