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.
|
protected Charset |
getDefaultEncoding()
Defines the default encoding for CSV files, if it can't be determined from the BOM.
|
protected 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 filesprotected abstract Collection<? extends R> createEntities(Map<String,String> row)
row - contains the mapping from the header names to the current row dataprotected Charset getDefaultEncoding()
protected org.supercsv.io.CsvListReader openCsvListReader(File importFile) throws IOException
GZIPInputStream.importFile - the csv fileIOException - on io exceptionprotected Collection<R> readImportFiles() throws IOException
IOException - on errorCopyright © 2016 fastnate.org. All rights reserved.