|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface DocumentIterator
An iterator over documents.
This interface provide a nextDocument()
method returning the next document, or null
if
no more documents are available. Usually
you would need to Document.close()
each document when you
are finished with it, but in the present case it is
guaranteed that each call to nextDocument()
will close the previously returned document.
An additional close()
method releases all resources
used by the iterator. Implementations are invited to be
safely closeable
.
Method Summary | |
---|---|
void |
close()
Closes this document iterator, releasing all resources. |
Document |
nextDocument()
Returns the next document. |
Method Detail |
---|
Document nextDocument() throws IOException
null
if there are no other documents.
IOException
void close() throws IOException
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.
close
in interface Closeable
IOException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |