public class CSVIterator extends Object implements Iterator<String[]>
Fair warning! This mechanism of getting at the data opencsv delivers has limitations when used with the opencsv annotations. Locales and custom converters are not supported. Further features may or may not work.
Constructor and Description |
---|
CSVIterator(CSVReader reader) |
Modifier and Type | Method and Description |
---|---|
boolean |
hasNext()
Returns true if the iteration has more elements.
|
String[] |
next()
Returns the next element in the iterator.
|
void |
remove()
This method is not supported by opencsv and will throw an
UnsupportedOperationException if called. |
public CSVIterator(CSVReader reader) throws IOException
reader
- Reader for the CSV data.IOException
- If unable to read data from the reader.public boolean hasNext()
next()
would return an element
rather than throwing an exception.public String[] next()
public void remove()
UnsupportedOperationException
if called.Copyright © 2017. All rights reserved.