public final class CsvReader extends java.lang.Object implements java.lang.Iterable<CsvRow>, java.io.Closeable
Example use:
try (CsvReader csvReader = CsvReader.builder().build(path)) {
for (CsvRow row : csvReader) {
...
}
}
| Modifier and Type | Class and Description |
|---|---|
static class |
CsvReader.CsvReaderBuilder
This builder is used to create configured instances of
CsvReader. |
| Modifier and Type | Method and Description |
|---|---|
static CsvReader.CsvReaderBuilder |
builder()
Constructs a
CsvReader.CsvReaderBuilder to configure and build instances of this class. |
void |
close() |
CloseableIterator<CsvRow> |
iterator() |
java.util.Spliterator<CsvRow> |
spliterator() |
java.util.stream.Stream<CsvRow> |
stream()
Creates a new sequential
Stream from this instance. |
java.lang.String |
toString() |
public static CsvReader.CsvReaderBuilder builder()
CsvReader.CsvReaderBuilder to configure and build instances of this class.CsvReader.CsvReaderBuilder instance.public CloseableIterator<CsvRow> iterator()
iterator in interface java.lang.Iterable<CsvRow>public java.util.Spliterator<CsvRow> spliterator()
spliterator in interface java.lang.Iterable<CsvRow>public java.util.stream.Stream<CsvRow> stream()
Stream from this instance.
A close handler is registered by this method in order to close the underlying resources. Don't forget to close the returned stream when you're done.
Stream.public void close()
throws java.io.IOException
close in interface java.io.Closeableclose in interface java.lang.AutoCloseablejava.io.IOExceptionpublic java.lang.String toString()
toString in class java.lang.Object