StreamIterator<CSVRecord>
, Iterator<CSVRecord>
public class CSVReader extends Object implements StreamIterator<CSVRecord>
Constructor | Description |
---|---|
CSVReader(InputStream inputStream) |
|
CSVReader(InputStream inputStream,
boolean hasHeader) |
|
CSVReader(InputStream inputStream,
Charset charset) |
|
CSVReader(InputStream inputStream,
Charset charset,
boolean hasHeader) |
Modifier and Type | Method | Description |
---|---|---|
CSVHeader |
getHeader() |
|
boolean |
hasNext() |
|
CSVRecord |
next() |
This method overwrites
Iterator.next() with a one change: The
resulting element is never null . |
CSVRecord |
peek() |
This method returns the next element which will be returned by next(),
without moving forward.
|
forEachRemaining, remove
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
empty, filter, flatMap, map, of, spliterator, stream
public CSVReader(InputStream inputStream)
public CSVReader(InputStream inputStream, Charset charset)
public CSVReader(InputStream inputStream, boolean hasHeader)
public CSVReader(InputStream inputStream, Charset charset, boolean hasHeader)
public CSVHeader getHeader()
public CSVRecord next() throws NoSuchElementException
StreamIterator
Iterator.next()
with a one change: The
resulting element is never null
.next
in interface Iterator<CSVRecord>
next
in interface StreamIterator<CSVRecord>
NoSuchElementException
is thrown.
Iterator.hasNext()
will returned false
in this case and
should be asked for the presence of more elements in advance. The
result is never null
.NoSuchElementException
- is thrown in case the stream has reached its
end.public CSVRecord peek() throws NoSuchElementException
StreamIterator
peek
in interface StreamIterator<CSVRecord>
NoSuchElementException
is thrown.
Iterator.hasNext()
will returned false
in this case and
should be asked for the presence of more elements in advance. The
result is never null
.NoSuchElementException
- is thrown in case the stream has reached its
end.Copyright © 2017–2018 PureSol Technologies. All rights reserved.