-
- All Superinterfaces:
AutoCloseable
public interface RowReader<T> extends AutoCloseable
ARowReader
reads a set of elements (a row) from an external source.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
hasNext()
Determines whether a next element can be read.String
nextRaw()
Reads the next row and returns it as is ("raw").T
nextRow()
Reads the next element.-
Methods inherited from interface java.lang.AutoCloseable
close
-
-
-
-
Method Detail
-
hasNext
boolean hasNext()
Determines whether a next element can be read.- Returns:
- True in case there is a next element, false if not.
-
nextRow
T nextRow() throws IOException
Reads the next element.- Returns:
- The next element being read.
- Throws:
IOException
- thrown in case there was an I/O related problem.NoSuchElementException
- thrown in case there is none next element to be read (check withhasNext()
if there is actually a next element which can be read).
-
nextRaw
String nextRaw()
Reads the next row and returns it as is ("raw"). This is useful when encountering a conversion problem or format problem regarding one line in a CSV file and this erroneous line is to be addressed separately.- Returns:
- The next raw line "as is".
-
-