Package be.personify.util
Class CsvFileReader
- java.lang.Object
-
- be.personify.util.CsvFileReader
-
public class CsvFileReader extends Object
- Author:
- vanderw
-
-
Constructor Summary
Constructors Constructor Description CsvFileReader()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static 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)
-
-
-
Method Detail
-
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
-
-