|
Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference 11g Release 1 (11.1.1.6.0) E13403-07 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object oracle.javatools.util.LineIterator
public class LineIterator
An iterator on the lines of an input stream or reader. The iteration yields
the lines of the file in order. The repeat()
method causes the last
line iterated to be repeated once.
Constructor Summary | |
---|---|
LineIterator(java.io.BufferedReader reader)
Creates an iterator for the lines returned by a BufferedReader . |
|
LineIterator(java.io.InputStream stream)
Creates an iterator for the lines returned by an InputStream . |
|
LineIterator(java.io.Reader reader)
Creates an iterator for the lines returned by a Reader . |
Method Summary | |
---|---|
int |
getLineCount()
Gets the number of the lines iterated so far. |
boolean |
hasNext()
Gets whether the iterator has iterated all lines available from the reader. |
java.lang.Object |
next()
Gets the next uniterated line available from the reader, or the last iterated line if repeat() was invoked. |
void |
remove()
|
void |
repeat()
Repeatd the last iterated line. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public LineIterator(java.io.BufferedReader reader)
BufferedReader
.
public LineIterator(java.io.Reader reader)
Reader
. The reader
is wrapped in a BufferedReader
if it is not already one.
public LineIterator(java.io.InputStream stream)
InputStream
. The
input stream is wrapped in a BufferedReader
.
Method Detail |
---|
public boolean hasNext()
hasNext
in interface java.util.Iterator
public java.lang.Object next()
repeat()
was invoked.
next
in interface java.util.Iterator
public void repeat()
java.util.NoSuchElementException
- if no line has been iterated.public int getLineCount()
next()
, gets 0; after the first call to next()
, gets 1, and
so on. Repeated lines are not multiply counted.
public void remove()
remove
in interface java.util.Iterator
java.lang.UnsupportedOperationException
|
Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference 11g Release 1 (11.1.1.6.0) E13403-07 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |