|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
DataStream represents a stream of data elements of some specific type. The stream manifests itself as an iterator that allows the stream data to be scanned once, and once only.
Each data stream has a data type. The stream elements are expected to be of that type, although different stream implementations may enforce or ignore this constraint in various ways.
DataSource,
Type| Field Summary | |
static long |
INITIAL_INDEX
Data stream initial element index value (-1). |
| Method Summary | |
boolean |
close()
Explicitly closes this data stream, and frees all system resources it has allocated immediately. |
long |
getIndex()
Retrieves the index number of the element returned by the latest next() call. |
boolean |
hasNext()
Tests if the stream still contains data. |
DataValue |
next()
Gets the next data from the stream. |
| Methods inherited from interface com.davisor.data.Data |
getType |
| Field Detail |
public static final long INITIAL_INDEX
| Method Detail |
public boolean close()
Closing data streams as early as possible is important in particular in server applications where resouces are shared between a number of threads.
hasNext()public long getIndex()
next() call. The index represents the position of the
element within this stream. The stream index may or may
not be equal to any other indexes the element itself thinks it
posesses.
The index value is initially -1, indicating no
element. After first next() call, index becomes 0, then
1, and so on. This functionality resembles
java.sql.resultSet#getRow method functionality, but
with the difference that the index counter starts from 0, not 1.
public boolean hasNext()
true if it does.
public DataValue next()
throws InvalidDataException
InvalidDataException - if no data element could be retrieved
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||