Class CompleteFileReader<T>
java.lang.Object
com.opencsv.bean.concurrent.SingleLineReader
com.opencsv.bean.concurrent.CompleteFileReader<T>
- Type Parameters:
T- The type of bean being created
- All Implemented Interfaces:
Runnable
Implements a separate thread for reading input and siphoning it to a
LineExecutor.- Since:
- 5.2
- Author:
- Andrew Rucker Jones
-
Field Summary
Fields inherited from class SingleLineReader
csvReader, ignoreEmptyLines, line -
Constructor Summary
ConstructorsConstructorDescriptionCompleteFileReader(CSVReader csvReader, CsvToBeanFilter filter, boolean ignoreEmptyLines, MappingStrategy<? extends T> mappingStrategy, CsvExceptionHandler exceptionHandler, List<BeanVerifier<T>> verifiers) -
Method Summary
Modifier and TypeMethodDescriptionlongvoidrun()Runs a nice, tight loop to simply read input and submit for conversion.voidsetExecutor(LineExecutor<T> executor) Sets the executor that will convert text input to bean output.Methods inherited from class SingleLineReader
getLine, getLinesRead, readNextLine
-
Constructor Details
-
CompleteFileReader
public CompleteFileReader(CSVReader csvReader, CsvToBeanFilter filter, boolean ignoreEmptyLines, MappingStrategy<? extends T> mappingStrategy, CsvExceptionHandler exceptionHandler, List<BeanVerifier<T>> verifiers) - Parameters:
csvReader- TheCSVReaderfrom which input is readfilter- Filter to be applied to the inputignoreEmptyLines- Whether empty lines of input should be ignoredmappingStrategy- The mapping strategy in useexceptionHandler- Determines the exception handling behaviorverifiers- Verifiers to be applied to the beans created
-
-
Method Details
-
getTerminalException
- Returns:
- The exception that brought execution to a halt
-
getLineProcessed
public long getLineProcessed()- Returns:
- How many lines have been processed thus far
-
setExecutor
Sets the executor that will convert text input to bean output.- Parameters:
executor- The executor to use
-
run
-