java.lang.Object
org.simpleflatmapper.lightningcsv.CsvReader
-
Constructor Summary
ConstructorsConstructorDescriptionCsvReader(AbstractCharConsumer charConsumer) CsvReader(AbstractCharConsumer charConsumer, org.simpleflatmapper.util.Function<? super CellConsumer, ? extends CellConsumer> cellConsumerWrapper) -
Method Summary
Modifier and TypeMethodDescriptioniterator()<CC extends CellConsumer>
CCparseAll(CC cellConsumer) parse cvsbooleanparseRow(CellConsumer cellConsumer) parse cvs<CC extends CellConsumer>
CCparseRows(CC cellConsumer, int limit) booleanrawParseRow(CellConsumer cellConsumer, boolean keepRow) <RH extends org.simpleflatmapper.util.CheckedConsumer<String[]>>
RHread(RH consumer) <RH extends org.simpleflatmapper.util.CheckedConsumer<String[]>>
RHread(RH consumer, int limit) voidskipRows(int n) stream()wrapConsumer(CellConsumer cellConsumer) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
CsvReader
-
CsvReader
public CsvReader(AbstractCharConsumer charConsumer, org.simpleflatmapper.util.Function<? super CellConsumer, ? extends CellConsumer> cellConsumerWrapper)
-
-
Method Details
-
parseAll
parse cvs- Type Parameters:
CC- the cell consumer type- Parameters:
cellConsumer- the consumer that the parser will callback- Returns:
- the cell consumer
- Throws:
IOException- if an io error occurs
-
parseRow
parse cvs- Parameters:
cellConsumer- the cell consumer- Returns:
- true if there was data consumed
- Throws:
IOException- if io error occurs
-
rawParseRow
- Throws:
IOException
-
skipRows
- Throws:
IOException
-
parseRows
- Throws:
IOException
-
read
public <RH extends org.simpleflatmapper.util.CheckedConsumer<String[]>> RH read(RH consumer) throws IOException - Throws:
IOException
-
read
public <RH extends org.simpleflatmapper.util.CheckedConsumer<String[]>> RH read(RH consumer, int limit) throws IOException - Throws:
IOException
-
wrapConsumer
-
charBuffer
-
iterator
-
rowIterator
- Throws:
IOException
-
stream
-
rowStream
-