I am using uniVocity in order to parse two different files. For every line of the first file I need to iterate through file 2 in order to make some comparisons.
RowListProcessor rowProcessor = new RowListProcessor();
CsvParserSettings settings = new CsvParserSettings();
settings.setRowProcessor(rowProcessor);
settings.setLineSeparatorDetectionEnabled(true);
settings.setHeaderExtractionEnabled(true);
settings.setSkipEmptyLines(true);
CsvParser file1Parser = new CsvParser(settings);
CsvParser file2Parser = new CsvParser(settings);
Do I need to use different CsvParserSettings
for the two parsers, or is there some other way to define rowProcessor
s?
Also how can I read the files line by line in order to perform the operations I need in each line?