public class CSVDataSource extends Object implements RawDataSource
| Modifier and Type | Field and Description |
|---|---|
protected List<String[]> |
allrows |
protected au.com.bytecode.opencsv.CSVReader |
csvIn |
protected List<String> |
headers |
protected boolean |
preload |
protected String[] |
row |
static String |
ROW_VARNAME |
protected long |
rowNum |
INDEX, ROW| Constructor and Description |
|---|
CSVDataSource(File file) |
CSVDataSource(File file,
boolean preload) |
CSVDataSource(Reader reader) |
CSVDataSource(Reader reader,
boolean preload) |
| Modifier and Type | Method and Description |
|---|---|
List<String> |
getFieldNames()
Return the set of top level field names in each record
|
long |
getRowsProcessed() |
boolean |
hasNext()
Return true if more record values are available.
|
Iterator<Map<String,Object>> |
iterator()
Return itself as an iterator
|
Map<String,Object> |
next()
Return the next record value.
|
void |
remove() |
long |
size()
Return the total number of rows in the source or -1 if this information is not available
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitforEach, spliteratorforEachRemainingpublic static final String ROW_VARNAME
protected au.com.bytecode.opencsv.CSVReader csvIn
protected String[] row
protected long rowNum
protected boolean preload
public CSVDataSource(File file) throws IOException
IOExceptionpublic CSVDataSource(Reader reader) throws IOException
IOExceptionpublic CSVDataSource(File file, boolean preload) throws IOException
IOExceptionpublic CSVDataSource(Reader reader, boolean preload) throws IOException
IOExceptionpublic long getRowsProcessed()
public List<String> getFieldNames()
RawDataSourcegetFieldNames in interface RawDataSourcepublic boolean hasNext()
RawDataSourcepublic Map<String,Object> next()
RawDataSourcepublic Iterator<Map<String,Object>> iterator()
RawDataSourcepublic long size()
RawDataSourcesize in interface RawDataSourceCopyright © 2015. All rights reserved.