org.apache.poi.hssf.model
Class RecordStream

java.lang.Object
  extended by org.apache.poi.hssf.model.RecordStream

public final class RecordStream
extends java.lang.Object

Simplifies iteration over a sequence of Record objects.


Constructor Summary
RecordStream(java.util.List<Record> records, int startIx)
           
RecordStream(java.util.List<Record> inputList, int startIndex, int endIx)
          Creates a RecordStream bounded by startIndex and endIndex
 
Method Summary
 int getCountRead()
           
 Record getNext()
           
 boolean hasNext()
           
 java.lang.Class<? extends Record> peekNextClass()
           
 int peekNextSid()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RecordStream

public RecordStream(java.util.List<Record> inputList,
                    int startIndex,
                    int endIx)
Creates a RecordStream bounded by startIndex and endIndex

Parameters:
inputList - the list to iterate over
startIndex - the start index within the list
endIx - the end index within the list, which is the index of the end element + 1

RecordStream

public RecordStream(java.util.List<Record> records,
                    int startIx)
Method Detail

hasNext

public boolean hasNext()

getNext

public Record getNext()

peekNextClass

public java.lang.Class<? extends Record> peekNextClass()
Returns:
the Class of the next Record. null if this stream is exhausted.

peekNextSid

public int peekNextSid()
Returns:
-1 if at end of records

getCountRead

public int getCountRead()