it.unimi.di.mg4j.document
Class AbstractDocumentIterator
java.lang.Object
it.unimi.di.mg4j.document.AbstractDocumentIterator
- All Implemented Interfaces:
- DocumentIterator, SafelyCloseable, Closeable
- Direct Known Subclasses:
- JdbcDocumentCollection.JdbcDocumentIterator
public abstract class AbstractDocumentIterator
- extends Object
- implements DocumentIterator, SafelyCloseable
An abstract, safely closeable
implementation of a document iterator.
Method Summary |
void |
close()
Closes this document iterator, releasing all resources. |
protected void |
finalize()
|
AbstractDocumentIterator
public AbstractDocumentIterator()
finalize
protected void finalize()
throws Throwable
- Overrides:
finalize
in class Object
- Throws:
Throwable
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 DocumentIterator
- Specified by:
close
in interface Closeable
- Throws:
IOException