E - the type of the stream elements.final class IOIteratorAdapter<E> extends java.lang.Object implements IOIterator<E>
Iterator as an IOIterator.| Constructor and Description |
|---|
IOIteratorAdapter(java.util.Iterator<E> delegate) |
| Modifier and Type | Method and Description |
|---|---|
(package private) static <E> IOIteratorAdapter<E> |
adapt(java.util.Iterator<E> delegate)
Adapts the given Iterator as an IOIterator.
|
boolean |
hasNext()
Like
Iterator.hasNext(). |
E |
next()
Like
Iterator.next(). |
java.util.Iterator<E> |
unwrap()
Unwraps this instance and returns the underlying
Iterator. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitasIterator, forEachRemaining, removeprivate final java.util.Iterator<E> delegate
IOIteratorAdapter(java.util.Iterator<E> delegate)
static <E> IOIteratorAdapter<E> adapt(java.util.Iterator<E> delegate)
IOIteratoradapt in interface IOIterator<E>E - the type of the stream elements.delegate - The iterator to adaptpublic boolean hasNext()
throws java.io.IOException
IOIteratorIterator.hasNext().hasNext in interface IOIterator<E>java.io.IOException - if an I/O error occurs.public E next() throws java.io.IOException
IOIteratorIterator.next().next in interface IOIterator<E>java.io.IOException - if an I/O error occurs.public java.util.Iterator<E> unwrap()
IOIteratorIterator.
Implementations may not have anything to unwrap and that behavior is undefined for now.
unwrap in interface IOIterator<E>