Class RowListProcessor
java.lang.Object
com.univocity.parsers.common.processor.core.AbstractListProcessor<ParsingContext>
com.univocity.parsers.common.processor.RowListProcessor
- All Implemented Interfaces:
Processor<ParsingContext>
,RowProcessor
A convenience
RowProcessor
implementation for storing all rows parsed into a list.
A typical use case of this class will be:
parserSettings.setRowProcessor(new RowListProcessor()); parser.parse(reader); // will invoke theRowProcessor.rowProcessed(String[], ParsingContext)
method for each parsed record. String[] headers = rowProcessor.getHeaders(); List<String[]> rows = rowProcessor.getRows();
-
Constructor Summary
ConstructorsConstructorDescriptionCreates a new processor ofString[]
rows.RowListProcessor
(int expectedRowCount) Creates a new processor ofString[]
rows. -
Method Summary
Methods inherited from class com.univocity.parsers.common.processor.core.AbstractListProcessor
getHeaders, getRows, processEnded, processStarted, rowProcessed
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.univocity.parsers.common.processor.RowProcessor
processEnded, processStarted, rowProcessed
-
Constructor Details
-
RowListProcessor
public RowListProcessor()Creates a new processor ofString[]
rows. -
RowListProcessor
public RowListProcessor(int expectedRowCount) Creates a new processor ofString[]
rows.- Parameters:
expectedRowCount
- expected number of rows to be parsed from the input. Used to pre-allocate the size of the outputList
returned byAbstractListProcessor.getRows()
-