Interface IOIterator<E>

  • Type Parameters:
    E - the type of elements returned by this iterator.
    All Known Implementing Classes:
    ArchiveInputStream.ArchiveEntryIOIterator

    public interface IOIterator<E>
    Like Iterator but throws IOException.
    Since:
    1.27.1-0
    • Method Detail

      • hasNext

        boolean hasNext()
                 throws java.io.IOException
        Like Iterator.hasNext().
        Returns:
        See delegate.
        Throws:
        java.io.IOException - if an I/O error occurs.
      • next

        E next()
        throws java.io.IOException
        Like Iterator.next().
        Returns:
        See delegate.
        Throws:
        java.io.IOException - if an I/O error occurs.
        java.util.NoSuchElementException - if the iteration has no more elements
      • forEachRemaining

        default void forEachRemaining​(IOConsumer<? super E> action)
                               throws java.io.IOException
        Like Iterator.forEachRemaining(Consumer).
        Parameters:
        action - See delegate.
        Throws:
        java.io.IOException - if an I/O error occurs.
      • asIterator

        default java.util.Iterator<E> asIterator()
        Creates an Iterator for this instance that throws UncheckedIOException instead of IOException.
        Returns:
        an UncheckedIOException Iterator.