Package org.apache.commons.io.function
Interface IOIterator<E>
- Type Parameters:
- E- the type of elements returned by this iterator.
public interface IOIterator<E>
Like 
Iterator but throws IOException.- Since:
- 2.12.0
- 
Method SummaryModifier and TypeMethodDescriptionstatic <E> IOIterator<E> Adapts the given Iterable as an IOIterator.static <E> IOIterator<E> Adapts the given Iterator as an IOIterator.default voidforEachRemaining(IOConsumer<? super E> action) booleanhasNext()LikeIterator.hasNext().next()LikeIterator.next().default voidremove()LikeIterator.remove().unwrap()Unwraps this instance and returns the underlyingIterator.
- 
Method Details- 
adaptAdapts the given Iterable as an IOIterator.- Type Parameters:
- E- the type of the stream elements.
- Parameters:
- iterable- The iterable to adapt
- Returns:
- A new IOIterator
- Since:
- 2.17.0
 
- 
adaptAdapts the given Iterator as an IOIterator.- Type Parameters:
- E- the type of the stream elements.
- Parameters:
- iterator- The iterator to adapt
- Returns:
- A new IOIterator
 
- 
asIterator- Returns:
- an UncheckedIOExceptionIterator.
 
- 
forEachRemaining- Parameters:
- action- See delegate.
- Throws:
- IOException- if an I/O error occurs.
 
- 
hasNextLikeIterator.hasNext().- Returns:
- See delegate.
- Throws:
- IOException- if an I/O error occurs.
 
- 
nextLikeIterator.next().- Returns:
- See delegate.
- Throws:
- IOException- if an I/O error occurs.
- NoSuchElementException- if the iteration has no more elements
 
- 
removeLikeIterator.remove().- Throws:
- IOException- if an I/O error occurs.
 
- 
unwrapUnwraps this instance and returns the underlyingIterator.Implementations may not have anything to unwrap and that behavior is undefined for now. - Returns:
- the underlying Iterator.
 
 
-