接口 StructureDataIterator
-
- 所有已知实现类:
ArrayStructureBak.ArrayStructureIterator,SequenceIterator,StructureDataIteratorLimited,StructureDataIteratorMediated
public interface StructureDataIteratorAn iterator over StructureData. Make sure that you call finish(). Best to put in a try/finally block like:try { while (iter.hasNext()) process(iter.next()); } finally { iter.finish(); }- 从以下版本开始:
- Feb 23, 2008
- 作者:
- caron
-
-
方法概要
所有方法 实例方法 抽象方法 修饰符和类型 方法 说明 voidfinish()Make sure that the iterator is complete, and recover resources.intgetCurrentRecno()booleanhasNext()See if theres more StructureData in the iteration.StructureDatanext()Get the next StructureData in the iteration.StructureDataIteratorreset()Start the iteration over again.voidsetBufferSize(int bytes)Hint to use this much memory in buffering the iteration.
-
-
-
方法详细资料
-
hasNext
boolean hasNext() throws java.io.IOExceptionSee if theres more StructureData in the iteration. You must always call this before calling next().- 返回:
- true if more records are available
- 抛出:
java.io.IOException- on read error
-
next
StructureData next() throws java.io.IOException
Get the next StructureData in the iteration.- 返回:
- next StructureData record.
- 抛出:
java.io.IOException- on read error
-
setBufferSize
void setBufferSize(int bytes)
Hint to use this much memory in buffering the iteration. No guarentee that it will be used by the implementation.- 参数:
bytes- amount of memory in bytes
-
reset
StructureDataIterator reset()
Start the iteration over again.- 返回:
- a new or reset iterator.
-
getCurrentRecno
int getCurrentRecno()
-
finish
void finish()
Make sure that the iterator is complete, and recover resources. Best to put in a try/finally block like:try { while (iter.hasNext()) process(iter.next()); } finally { iter.finish(); }
-
-