public interface TabularData
extends java.io.Closeable
The cell data may always be retrieved sequentially from the table
by acquiring a RowSequence object (method getRowSequence()
) -
this allows you to read all the data from the first row to the last.
Multiple RowSequences may be simultaneously active.
In some cases random access may also be available; if isRandom()
returns true, then the getRowAccess()
, getRow(long)
and
getCell(long, int)
methods can be used to retrieve cell values in any order.
The objects retrieved from cells in a given column are of course
determined by the corresponding FIELD element (FieldElement
object),
in particular its arraysize and datatype attributes.
What object is returned from each column is described by the following
rules:
getContentClass(int)
method.Modifier and Type | Method and Description |
---|---|
java.lang.Object |
getCell(long irow,
int icol)
Returns the contents of a given table cell (optional).
|
int |
getColumnCount()
Returns the number of columns in the table data.
|
java.lang.Class<?> |
getContentClass(int icol)
Returns a class to which all elements in a given column can be cast.
|
java.lang.Object[] |
getRow(long irow)
Returns the contents of a given table row (optional).
|
RowAccess |
getRowAccess()
Returns an object which can provide random access for the table data.
|
long |
getRowCount()
Returns the number of rows in the table data.
|
RowSequence |
getRowSequence()
Returns an object which can iterate over all the rows in the
table data sequentially.
|
boolean |
isRandom()
Indicates whether random access is provided by this table.
|
int getColumnCount()
long getRowCount()
isRandom()
returns true.java.lang.Class<?> getContentClass(int icol)
icol
- the column (0-based)RowSequence getRowSequence() throws java.io.IOException
java.io.IOException
boolean isRandom()
getRow(long)
and getCell(long, int)
methods be used.RowAccess getRowAccess() throws java.io.IOException
java.io.IOException
- if there is I/O troublejava.lang.UnsupportedOperationException
- if isRandom returns falsejava.lang.Object getCell(long irow, int icol) throws java.io.IOException
irow
- row indexicol
- column indexjava.io.IOException
- if there is I/O troublejava.lang.UnsupportedOperationException
- if isRandom returns falsejava.lang.Object[] getRow(long irow) throws java.io.IOException
irow
- row indexjava.io.IOException
- if there is I/O troublejava.lang.UnsupportedOperationException
- if isRandom returns false