Home | History | Annotate | Download | only in io

Lines Matching refs:reader

21 import java.io.Reader;

26 * An Iterator over the lines in a <code>Reader</code>.
28 * <code>LineIterator</code> holds a reference to an open <code>Reader</code>.
29 * When you have finished with the iterator you should close the reader
30 * to free internal resources. This can be done by closing the reader directly,
55 /** The reader that is being read. */
63 * Constructs an iterator of the lines for a <code>Reader</code>.
65 * @param reader the <code>Reader</code> to read from, not null
66 * @throws IllegalArgumentException if the reader is null
68 public LineIterator(final Reader reader) throws IllegalArgumentException {
69 if (reader == null) {
70 throw new IllegalArgumentException("Reader must not be null");
72 if (reader instanceof BufferedReader) {
73 bufferedReader = (BufferedReader) reader;
75 bufferedReader = new BufferedReader(reader);
81 * Indicates whether the <code>Reader</code> has more lines.
85 * @return <code>true</code> if the Reader has more lines
123 * Returns the next line in the wrapped <code>Reader</code>.
133 * Returns the next line in the wrapped <code>Reader</code>.
148 * Closes the underlying <code>Reader</code> quietly.
151 * then the <code>Reader</code> remains open.