R - the row typepublic abstract class AbstractCsvReader<R> extends Object
| Constructor and Description |
|---|
AbstractCsvReader(File importPath)
Creates a new instance of
AbstractCsvReader. |
| Modifier and Type | Method and Description |
|---|---|
protected abstract Collection<? extends R> |
createEntities(Map<String,String> row)
Builds one or more entities from the given row.
|
static org.supercsv.io.CsvListReader |
openCsvListReader(File importFile)
Opens a CSV file.
|
protected Collection<R> |
readImportFiles()
Reads the import files.
|
public AbstractCsvReader(File importPath)
AbstractCsvReader.importPath - the path to a file or to a directory that contains *.csv filespublic static org.supercsv.io.CsvListReader openCsvListReader(File importFile) throws IOException
GZIPInputStream.importFile - the csv fileIOException - on io exceptionprotected abstract Collection<? extends R> createEntities(Map<String,String> row)
row - contains the mapping from the header names to the current row dataprotected Collection<R> readImportFiles() throws IOException
IOException - on errorCopyright © 2015 fastnate.org. All rights reserved.