public class CSVDataSource extends java.lang.Object implements VersatileDataSource
| Constructor and Description |
|---|
CSVDataSource(java.io.File file,
boolean headers,
char delim)
Construct a CSV source from a filename.
|
CSVDataSource(java.io.File file,
boolean headers,
CSVFormat format)
Construct a CSV source from a filename.
|
| Modifier and Type | Method and Description |
|---|---|
int |
columnIndex(java.lang.String name)
Obtain the column index for the specified name.
|
java.lang.String[] |
readLine()
Read a line from the source.
|
void |
rewind()
Rewind the source back to the beginning.
|
public CSVDataSource(java.io.File file,
boolean headers,
char delim)
file - The file.headers - The headers.delim - The delimiter.public CSVDataSource(java.io.File file,
boolean headers,
CSVFormat format)
file - The file.headers - The headers.format - The format.public java.lang.String[] readLine()
readLine in interface VersatileDataSourcepublic void rewind()
rewind in interface VersatileDataSourcepublic int columnIndex(java.lang.String name)
columnIndex in interface VersatileDataSourcename - The column name.