public interface TableReader
| Modifier and Type | Interface and Description |
|---|---|
static class |
TableReader.MissingPropertyGetterException |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Close the input source for this TableReader.
|
int |
getApplicationVersion()
Get the application version associated with the file being read by this TableReader.
|
String[] |
getColumnNames()
Get an array of all known column names.
|
SupportedType |
getColumnType(String columnName)
Get the SupportedType of the named column.
|
RowGetter<Row.Flags> |
getFlagGetter()
Retrieve the getter for the row flags.
|
RowGetter |
getGetter(String name)
Return a raw RowGetter for the column with the given name.
|
<T> RowGetter<T> |
getGetter(String name,
Class<T> tClass)
Return a typed RowGetter for the column with the given name.
|
default <T> RowGetter<T> |
getPropertyGetter(String property)
Retrieve a getter for the specified internal property.
|
default Supplier<RecordData> |
getRecordDataGetter()
Retrieve the getter for the RecordData.
|
default void |
readAllEntries()
Call
TableReader.readEntry() until it returns false. |
default void |
readAllEntries(Supplier<Boolean> additionalCondition)
Call
TableReader.readEntry() until the additionalCondition evaluates to false,
or TableReader.readEntry() returns false. |
default boolean |
readEntry()
Read a record from the source, expecting that not all records will be Row records.
|
boolean |
readRow()
Deprecated.
use
TableReader.readEntry() and handle record entries appropriately |
RowGetter getGetter(String name)
name - the column name<T> RowGetter<T> getGetter(String name, Class<T> tClass)
name - the column name@Deprecated boolean readRow() throws IOException
TableReader.readEntry() and handle record entries appropriatelyIllegalStateException will be thrown.IOException - if EOF is encountered mid-row or any invalid data is encountered.IllegalStateException - if a record entry is encountered.void close()
throws IOException
IOExceptionString[] getColumnNames()
TableReader.getGetter(String).SupportedType getColumnType(String columnName)
columnName - the name of the columnRuntimeException - if the columnName is not a valid columnRowGetter<Row.Flags> getFlagGetter()
default Supplier<RecordData> getRecordDataGetter()
int getApplicationVersion()
default boolean readEntry()
throws IOException
TableReader.readRow(), which cannot handle record entries.IOException - if EOF is encountered mid-entry or any invalid data is encountered.default void readAllEntries()
throws IOException
TableReader.readEntry() until it returns false. This relies on the Row and Record callbacks.IOExceptiondefault void readAllEntries(Supplier<Boolean> additionalCondition) throws IOException
TableReader.readEntry() until the additionalCondition evaluates to false,
or TableReader.readEntry() returns false.
This relies on the Row and Record callbacks.additionalCondition - an extra condition that might stop the loop.IOExceptiondefault <T> RowGetter<T> getPropertyGetter(String property)
property - The property to get a getter for