public abstract class AbstractTextTableReader extends AbstractTableReader
Constructor and Description |
---|
AbstractTextTableReader()
Create a new AbstractTextTableReader using a default ParserFactory.
|
AbstractTextTableReader(ParserFactory parserFactory)
Create a new AbstractTextTableReader.
|
Modifier and Type | Method and Description |
---|---|
protected java.util.ArrayList |
getColumnNames()
Subclasses can override this to provide column names through
a custom mechanism.
|
static java.lang.String |
getDefaultHeader(int idx)
Returns default column header names of the type "A", "B", ...,
"Z", "AA", "AB", etc.
|
protected abstract void |
read(java.io.InputStream is,
TableReadListener trl)
Scans the input stream, making call backs for each encountered entry
on the provided TextReadListener.
|
Table |
readTable(java.io.InputStream is)
Read in a table from the given InputStream.
|
void |
setHasHeader(boolean hasHeaderRow)
Set whether or not the table data file includes a header row.
|
readTable, readTable, readTable
public AbstractTextTableReader()
public AbstractTextTableReader(ParserFactory parserFactory)
parserFactory
- the ParserFactory to use for parsing text strings
into table values.public void setHasHeader(boolean hasHeaderRow)
hasHeaderRow
- true if the the data file includes a header row,
false otherwise.public Table readTable(java.io.InputStream is) throws DataIOException
TableReader
is
- the InputStream to read the table fromDataIOException
TableReader.readTable(java.io.InputStream)
protected java.util.ArrayList getColumnNames()
public static java.lang.String getDefaultHeader(int idx)
idx
- the index of the column headerprotected abstract void read(java.io.InputStream is, TableReadListener trl) throws java.io.IOException, DataParseException
is
- the InputStream to readtrl
- the TextReadListener that will receive callbacksjava.io.IOException
DataParseException
Copyright ? 2013 Regents of the University of California