public interface StructureDataIterator extends Closeable
try { while (iter.hasNext()) process(iter.next()); } finally { iter.finish(); }
Modifier and Type | Method and Description |
---|---|
default void |
close()
Make sure that the iterator is complete, and recover resources.
|
default void |
finish()
Deprecated.
use close() or try-with-resource
|
int |
getCurrentRecno() |
boolean |
hasNext()
See if theres more StructureData in the iteration.
|
StructureData |
next()
Get the next StructureData in the iteration.
|
StructureDataIterator |
reset()
Start the iteration over again.
|
default void |
setBufferSize(int bytes)
Hint to use this much memory in buffering the iteration.
|
boolean hasNext() throws IOException
IOException
- on read errorStructureData next() throws IOException
IOException
- on read errordefault void setBufferSize(int bytes)
bytes
- amount of memory in bytesStructureDataIterator reset()
int getCurrentRecno()
default void close()
try (StructureDataIterator iter = obj.getStructureDataIterator()) { while (iter.hasNext()) process(iter.next()); }
close
in interface AutoCloseable
close
in interface Closeable
default void finish()