|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object prefuse.data.io.AbstractTableReader prefuse.data.io.AbstractTextTableReader prefuse.data.io.FixedWidthTextTableReader
public class FixedWidthTextTableReader
TableReader for fixed-width text files, that encode one row of table
data per line use a fixed number of characters for each data column.
Reading such tables requires use of a schema description that describes
the fixed-widths for each individual column.
The FixedWidthTextTableSchema
class provides
this functionality.
Constructor Summary | |
---|---|
FixedWidthTextTableReader(FixedWidthTextTableSchema schema)
Creates a new FixedWidthTextTableReader using the given schema. |
|
FixedWidthTextTableReader(java.lang.String location)
Creates a new FixedWidthTextTableReader using the schema at the given location. |
Method Summary | |
---|---|
protected java.util.ArrayList |
getColumnNames()
Subclasses can override this to provide column names through a custom mechanism. |
FixedWidthTextTableSchema |
getFixedWidthSchema()
Get the schema description describing the data columns' fixed widths |
protected void |
read(java.io.InputStream is,
TableReadListener trl)
Scans the input stream, making call backs for each encountered entry on the provided TextReadListener. |
void |
setFixedWidthSchema(FixedWidthTextTableSchema schema)
Set the schema description describing the data columns' fixed widths |
Methods inherited from class prefuse.data.io.AbstractTextTableReader |
---|
getDefaultHeader, readTable, setHasHeader |
Methods inherited from class prefuse.data.io.AbstractTableReader |
---|
readTable, readTable, readTable |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public FixedWidthTextTableReader(FixedWidthTextTableSchema schema)
schema
- the schema description of the fixed-width text column lengthspublic FixedWidthTextTableReader(java.lang.String location) throws DataIOException
location
- a location string (filename, URL, or resource locator)
for the schema description of the fixed-width text column lengths
DataIOException
- if an IO exception occurs while loading the schemaMethod Detail |
---|
public FixedWidthTextTableSchema getFixedWidthSchema()
public void setFixedWidthSchema(FixedWidthTextTableSchema schema)
schema
- the fixed-width table schema descriptionprotected void read(java.io.InputStream is, TableReadListener trl) throws java.io.IOException, DataParseException
AbstractTextTableReader
read
in class AbstractTextTableReader
is
- the InputStream to readtrl
- the TextReadListener that will receive callbacks
java.io.IOException
DataParseException
AbstractTextTableReader.read(java.io.InputStream, prefuse.data.io.TableReadListener)
protected java.util.ArrayList getColumnNames()
AbstractTextTableReader
getColumnNames
in class AbstractTextTableReader
AbstractTextTableReader.getColumnNames()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |