Class JdbcDocumentCollection.JdbcDocumentIterator

    • Method Detail

      • nextDocument

        public Document nextDocument()
                              throws IOException
        Description copied from interface: DocumentIterator
        Returns the next document.
        Returns:
        the next document, or null if there are no other documents.
        Throws:
        IOException
      • close

        public void close()
                   throws IOException
        Description copied from interface: DocumentIterator
        Closes this document iterator, releasing all resources.

        You should always call this method after having finished with this iterator. Implementations are invited to call this method in a finaliser as a safety net, but since there is no guarantee as to when finalisers are invoked, you should not depend on this behaviour.

        Specified by:
        close in interface AutoCloseable
        Specified by:
        close in interface Closeable
        Specified by:
        close in interface DocumentIterator
        Overrides:
        close in class AbstractDocumentIterator
        Throws:
        IOException