Package org.gbif.utils.file
Interface ClosableReportingIterator<T>
- Type Parameters:
T- the type of elements returned by the iterator
- All Superinterfaces:
AutoCloseable,ClosableIterator<T>,Iterator<T>
- All Known Implementing Classes:
CSVReader
Interface that extends the ClosableIterator providing a means to check if there is an error, log what it is, store
the actual Exception, and skip over it to continue reading.
-
Method Summary
Modifier and TypeMethodDescriptionReturn an informative message about the error encountered while iterating over row.Return the Exception encountered while iterating over row.booleanReturn true if an error was encountered while iterating over row.Methods inherited from interface java.lang.AutoCloseable
closeMethods inherited from interface java.util.Iterator
forEachRemaining, hasNext, next, remove
-
Method Details
-
hasRowError
boolean hasRowError()Return true if an error was encountered while iterating over row. -
getErrorMessage
Return an informative message about the error encountered while iterating over row. Different from the Exception's message, used to store the row number, row string, etc. -
getException
Return the Exception encountered while iterating over row.
-