public final class CsvUtil extends Object
Modifier and Type | Method and Description |
---|---|
static org.apache.commons.csv.CSVParser |
parse(File csvFile)
Get a parser for CSV file.
|
static org.apache.commons.csv.CSVParser |
parse(File csvFile,
boolean skipHeaderRecord)
Get a parser for CSV file.
|
static org.apache.commons.csv.CSVParser |
parse(String csvFilePath)
Get a parser for CSV file.
|
static <T> Collection<T> |
parseToBeans(File csvFile,
Class<T> beanClass)
Populate beans with CSV data.
|
public static org.apache.commons.csv.CSVParser parse(File csvFile)
csvFile
- to get parser forpublic static org.apache.commons.csv.CSVParser parse(File csvFile, boolean skipHeaderRecord)
csvFile
- to get parser forskipHeaderRecord
- whether to skip header record while parsingpublic static org.apache.commons.csv.CSVParser parse(String csvFilePath)
csvFilePath
- path to file to get parser forpublic static <T> Collection<T> parseToBeans(File csvFile, Class<T> beanClass)
T
- type of bean as generic to create typed collectioncsvFile
- to get input data frombeanClass
- type of bean to populateCopyright © 2017–2022 wcm.io QA. All rights reserved.