public interface CloseableIterator<E>
extends java.util.Iterator<E>, java.lang.AutoCloseable
CloseableIterator
is intended to be used when it may hold resources (such as file or socket handles).
This allows implementations to clean up any resources they need to keep open to iterate over elements.Modifier and Type | Method and Description |
---|---|
void |
close() |