public abstract class AbstractDocumentIterator extends Object implements DocumentIterator, SafelyCloseable
safely closeable
implementation of a document iterator.| Constructor and Description |
|---|
AbstractDocumentIterator() |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Closes this document iterator, releasing all resources.
|
protected void |
finalize() |
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitnextDocumentprotected void finalize()
throws Throwable
public void close()
throws IOException
DocumentIteratorYou 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.
close in interface DocumentIteratorclose in interface Closeableclose in interface AutoCloseableIOException