edu.upc.dama.dex.io
Interface RowReader

All Known Implementing Classes:
CSVReader, JDBCReader

public interface RowReader

Common interface for those readers which get the data as String [].

See Also:
CSVReader, JDBCReader
Author:
Sparsity Technologies

Method Summary
 void close()
          Closes the underlying reader.
 int getRow()
          The row number for the current row.
 java.lang.String[] readNext()
          Reads the next row as a string array.
 boolean reset()
          Moves the reader to the beginning.
 

Method Detail

reset

boolean reset()
              throws java.io.IOException
Moves the reader to the beginning.

Restarts the reader.

Returns:
true if the reader can be restarted, false otherwise.
Throws:
java.io.IOException - If bad things happen during the restart.

readNext

java.lang.String[] readNext()
                            throws java.io.IOException
Reads the next row as a string array.

Returns:
A string array with each comma-separated element as a separate entry.
Throws:
java.io.IOException - If bad things happen during the read.

getRow

int getRow()
           throws java.io.IOException
The row number for the current row.

Returns:
The current row number; 0 if there is no current row.
Throws:
java.io.IOException - If it fails.

close

void close()
           throws java.io.IOException
Closes the underlying reader.

Throws:
java.io.IOException - If the close fails.