Package be.personify.util
Class CsvFileReader
java.lang.Object
be.personify.util.CsvFileReader
- Author:
- vanderw
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic List<org.apache.commons.csv.CSVRecord>readCsvFile(File file, String[] header) Reads a csv file with the given header definitionstatic List<org.apache.commons.csv.CSVRecord>readCsvFile(Reader reader, String[] header) Reads csv file with specified headerstatic List<org.apache.commons.csv.CSVRecord>readCsvFile(Reader reader, org.apache.commons.csv.CSVFormat csvFormat) Reads the csvfilestatic List<org.apache.commons.csv.CSVRecord>readCsvFile(String filePath)
-
Constructor Details
-
CsvFileReader
public CsvFileReader()
-
-
Method Details
-
readCsvFile
public static List<org.apache.commons.csv.CSVRecord> readCsvFile(Reader reader, String[] header) throws Exception Reads csv file with specified header- Parameters:
reader- that readsheader- containing the header info- Returns:
- a list containing the records
- Throws:
Exception- with the stacktrace
-
readCsvFile
public static List<org.apache.commons.csv.CSVRecord> readCsvFile(Reader reader, org.apache.commons.csv.CSVFormat csvFormat) throws Exception Reads the csvfile- Parameters:
reader- for readingcsvFormat- the format used to read- Returns:
- the list with the records
- Throws:
Exception- with the stacktrace
-
readCsvFile
public static List<org.apache.commons.csv.CSVRecord> readCsvFile(File file, String[] header) throws Exception Reads a csv file with the given header definition- Parameters:
file- containing the contentheader- containing header information- Returns:
- a list containing the records
- Throws:
Exception- with the stacktrace
-
readCsvFile
- Throws:
Exception
-