E - the type of elements returned by this iterator.public interface IOIterator<E>
Iterator but throws IOException.| Modifier and Type | Method and Description |
|---|---|
static <E> IOIterator<E> |
adapt(Iterator<E> iterator)
Adapts the given Iterator as an IOIterator.
|
default Iterator<E> |
asIterator()
|
default void |
forEachRemaining(IOConsumer<? super E> action)
|
boolean |
hasNext()
Like
Iterator.hasNext(). |
E |
next()
Like
Iterator.next(). |
default void |
remove()
Like
Iterator.remove(). |
Iterator<E> |
unwrap()
Unwraps this instance and returns the underlying
Iterator. |
static <E> IOIterator<E> adapt(Iterator<E> iterator)
E - the type of the stream elements.iterator - The iterator to adaptdefault Iterator<E> asIterator()
UncheckedIOException Iterator.default void forEachRemaining(IOConsumer<? super E> action) throws IOException
action - See delegate.IOException - if an I/O error occurs.boolean hasNext() throws IOException
Iterator.hasNext().IOException - if an I/O error occurs.E next() throws IOException
Iterator.next().IOException - if an I/O error occurs.NoSuchElementException - if the iteration has no more elementsdefault void remove() throws IOException
Iterator.remove().IOException - if an I/O error occurs.Copyright © 2002–2023 The Apache Software Foundation. All rights reserved.