T - - class to convert the objects to.public class IterableCSVToBean<T> extends AbstractCSVToBean implements Iterable<T>
| Constructor and Description |
|---|
IterableCSVToBean(CSVReader csvReader,
MappingStrategy<T> strategy,
CsvToBeanFilter filter)
IterableCSVToBean constructor
|
| Modifier and Type | Method and Description |
|---|---|
protected CSVReader |
getCSVReader()
retrieves the CSVReader.
|
protected CsvToBeanFilter |
getFilter()
retrieves the CsvToBeanFilter
|
protected PropertyEditor |
getPropertyEditor(PropertyDescriptor desc)
Attempt to find custom property editor on descriptor first, else try the propery editor manager.
|
protected MappingStrategy<T> |
getStrategy()
retrieves the MappingStrategy.
|
Iterator<T> |
iterator() |
T |
nextLine()
Reads and processes a single line.
|
checkForTrim, convertValuepublic IterableCSVToBean(CSVReader csvReader, MappingStrategy<T> strategy, CsvToBeanFilter filter)
csvReader - - CSVReader. Should not be null.strategy - - MappingStrategy used to map csv data to the bean. Should not be null.filter - - Optional CsvToBeanFilter used remove unwanted data from reads.protected MappingStrategy<T> getStrategy()
protected CSVReader getCSVReader()
protected CsvToBeanFilter getFilter()
public T nextLine() throws IllegalAccessException, InstantiationException, IOException, IntrospectionException, InvocationTargetException
IllegalAccessException - - thrown if there is an failure in Introspection.InstantiationException - - thrown when getting the PropertyDescriptor for the class.IOException - - thrown when there is an unexpected error reading the file.IntrospectionException - - thrown if there is an failure in Introspection.InvocationTargetException - - thrown if there is an failure in Introspection.protected PropertyEditor getPropertyEditor(PropertyDescriptor desc) throws InstantiationException, IllegalAccessException
getPropertyEditor in class AbstractCSVToBeandesc - - PropertyDescriptor.InstantiationException - - thrown when getting the PropertyEditor for the class.IllegalAccessException - - thrown when getting the PropertyEditor for the class.Copyright © 2016. All rights reserved.