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();
- Author:
- Univocity Software Pty Ltd - parsers@univocity.com
-
Constructor Summary
ConstructorsConstructorDescriptionCreates a new processor ofString[]rows.RowListProcessor(int expectedRowCount) Creates a new processor ofString[]rows. -
Method Summary
Methods inherited from class AbstractListProcessor
getHeaders, getRows, processEnded, processStarted, rowProcessedMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface 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 outputListreturned byAbstractListProcessor.getRows()
-