Package | Description |
---|---|
com.opencsv.bean |
A bean binding interface for use with opencsv.
|
Modifier and Type | Class and Description |
---|---|
class |
ColumnPositionMappingStrategy<T>
Allows for the mapping of columns with their positions.
|
class |
HeaderColumnNameMappingStrategy<T>
Maps data to objects using the column names in the first row of the CSV file
as reference.
|
class |
HeaderColumnNameTranslateMappingStrategy<T>
Expands on HeaderColumnNameMappingStrategy by allowing the user to pass in a
map of column names to bean names.
|
Modifier and Type | Method and Description |
---|---|
static <T> MappingStrategy<T> |
MappingUtils.determineMappingStrategy(Class type)
Determines which mapping strategy is appropriate for this bean.
|
protected MappingStrategy |
IterableCSVToBeanBuilder.getStrategy()
Used by unit tests.
|
protected MappingStrategy<T> |
IterableCSVToBean.getStrategy()
Retrieves the MappingStrategy.
|
Modifier and Type | Method and Description |
---|---|
List<T> |
CsvToBean.parse(MappingStrategy<T> mapper,
CSVReader csv)
Parse the values from the CSVReader.
|
List<T> |
CsvToBean.parse(MappingStrategy<T> mapper,
CSVReader csv,
boolean throwExceptions)
Parse the values from the CSVReader.
|
List<T> |
CsvToBean.parse(MappingStrategy<T> mapper,
CSVReader csv,
CsvToBeanFilter filter)
Parse the values from the CSVReader.
|
List<T> |
CsvToBean.parse(MappingStrategy<T> mapper,
CSVReader csv,
CsvToBeanFilter filter,
boolean throwExceptions)
Parse the values from the CSVReader.
|
List<T> |
CsvToBean.parse(MappingStrategy<T> mapper,
Reader reader)
Parse the values from a CSVReader constructed from the Reader passed in.
|
List<T> |
CsvToBean.parse(MappingStrategy<T> mapper,
Reader reader,
boolean throwExceptions)
Parse the values from a CSVReader constructed from the Reader passed in.
|
List<T> |
CsvToBean.parse(MappingStrategy<T> mapper,
Reader reader,
CsvToBeanFilter filter)
Parse the values from a CSVReader constructed from the Reader passed in.
|
List<T> |
CsvToBean.parse(MappingStrategy<T> mapper,
Reader reader,
CsvToBeanFilter filter,
boolean throwExceptions)
Parse the values from a CSVReader constructed from the Reader passed in.
|
protected static <T> String[] |
BeanToCsv.processHeader(MappingStrategy<T> mapper)
Deprecated.
Processes the header for the bean.
|
protected T |
CsvToBean.processLine(MappingStrategy<T> mapper,
String[] line)
Creates a single object from a line from the CSV file.
|
void |
CsvToBean.setMappingStrategy(MappingStrategy<T> mappingStrategy)
Sets the mapping strategy to be used by this bean.
|
IterableCSVToBeanBuilder<T> |
IterableCSVToBeanBuilder.withMapper(MappingStrategy<T> mappingStrategy)
Sets the MappingStrategy to be used by the builder.
|
StatefulBeanToCsvBuilder |
StatefulBeanToCsvBuilder.withMappingStrategy(MappingStrategy<T> mappingStrategy)
Sets the mapping strategy for writing beans to a CSV destination.
|
CsvToBeanBuilder |
CsvToBeanBuilder.withMappingStrategy(MappingStrategy<T> mappingStrategy) |
static <T> boolean |
BeanToCsv.write(MappingStrategy<T> mapper,
CSVWriter csv,
List<? extends T> objects)
Deprecated.
Writes all the objects, one at a time, to the CSVWriter using the passed
in Strategy.
|
static <T> boolean |
BeanToCsv.write(MappingStrategy<T> mapper,
CSVWriter csv,
T bean,
boolean writeHeader)
Deprecated.
Writes an single object allowing users to write large number of objects without worrying about
a large collection filling up memory.
|
static <T> boolean |
BeanToCsv.write(MappingStrategy<T> mapper,
Writer writer,
List<? extends T> objects)
Deprecated.
Writes all the objects, one at a time, to a created
Writer using the passed in strategy. |
Constructor and Description |
---|
IterableCSVToBean(CSVReader csvReader,
MappingStrategy<T> strategy,
CsvToBeanFilter filter)
IterableCSVToBean constructor
|
StatefulBeanToCsv(char escapechar,
String lineEnd,
MappingStrategy<T> mappingStrategy,
char quotechar,
char separator,
boolean throwExceptions,
Writer writer)
The only constructor that should be used.
|
Copyright © 2017. All rights reserved.