|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.penguinwerks.jodene.data.DataReader
com.penguinwerks.jodene.data.FileDataReader
Reads in data from a file. This Data Reader reads in data from a delimited file. The delimiter is configurable and is, by default, ',' (comma). The reader reads in a line at a time and splits the line into an array of trimmed strings. Until the end of the file, it reads a line, translates it, scales it and adds it to the list of results.
| Constructor Summary | |
FileDataReader()
|
|
| Method Summary | |
java.lang.String |
getDelimiter()
The delimiter used to separate inputs in a line. |
java.util.List |
readValues()
An implementation of DataReader.readValues(). |
void |
setDelimiter(java.lang.String delimiter)
The delimiter used to separate inputs in a line. |
void |
setFilename(java.lang.String filename)
The filename to read. |
| Methods inherited from class com.penguinwerks.jodene.data.DataReader |
defineColumn, defineColumn, defineRealInputField, defineTranslatedInputField, nameValues, scaleLine, translateLine |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public FileDataReader()
| Method Detail |
public java.lang.String getDelimiter()
public void setDelimiter(java.lang.String delimiter)
delimiter - The delimiter to set.public void setFilename(java.lang.String filename)
filename - The path to the input file.
public java.util.List readValues()
throws DataReadingException
DataReader.readValues(). Reads in the
delimited values and returns the data. If there is a problem, throws
a DataReadingException.
readValues in class DataReaderDataReadingException - Thrown if there is an error reading data.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||