Class CSVIterator
java.lang.Object
com.opencsv.CSVIterator
Provides an Iterator over the data found in opencsv.
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.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanhasNext()Returns true if the iteration has more elements.String[]next()Returns the next element in the iterator.voidremove()This method is not supported by opencsv and will throw anUnsupportedOperationExceptionif called.voidsetErrorLocale(Locale errorLocale) Sets the locale for error messages.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Iterator
forEachRemaining
-
Field Details
-
reader
-
nextLine
-
errorLocale
Locale for all translations.
-
-
Constructor Details
-
CSVIterator
- Parameters:
reader- Reader for the CSV data.- Throws:
IOException- If unable to read data from the reader.CsvValidationException- if custom defined validator fails.
-
-
Method Details
-
setErrorLocale
Sets the locale for error messages.- Parameters:
errorLocale- Locale for error messages. If null, the default locale is used.- Since:
- 4.0
-
hasNext
-
next
-
remove
public void remove()This method is not supported by opencsv and will throw anUnsupportedOperationExceptionif called.
-