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.
|
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.
|
default void close()
try (StructureDataIterator iter = obj.getStructureDataIterator()) { while (iter.hasNext()) process(iter.next()); }
close
in interface AutoCloseable
close
in interface Closeable
int getCurrentRecno()
boolean hasNext() throws IOException
IOException
- on read errorStructureData next() throws IOException
IOException
- on read errorStructureDataIterator reset()
default void setBufferSize(int bytes)
bytes
- amount of memory in bytes