Class RowReader
java.lang.Object
com.sparsity.sparksee.io.RowReader
- Direct Known Subclasses:
CSVReader
RowReader interface.
Common interface for those readers which get the data as an string array.
It works as follows: perform as many read operations as necessary and call close once at the end. Once close is called no more read operations can be executed.
Check out the 'Data import' section in the SPARKSEE User Manual for more details on this.
- Author:
- Sparsity Technologies http://www.sparsity-technologies.com
-
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Closes the reader.intgetRow()The row number for the current row.booleanread(StringList row) Reads the next row as a string array.booleanreset()Moves the reader to the beginning.
-
Method Details
-
close
-
reset
Moves the reader to the beginning.Restarts the reader.
- Returns:
- true if the reader can be restarted, false otherwise.
- Throws:
IOException- If bad things happen during the restart.
-
read
Reads the next row as a string array.- Parameters:
row- [out] A string list with each comma-separated element as a separate entry.- Returns:
- Returns true if a row had been read or false otherwise.
- Throws:
IOException- If bad things happen during the read.
-
getRow
The row number for the current row.- Returns:
- The current row number; 0 if there is no current row.
- Throws:
IOException- If it fails.
-