Interface RowReader

  • All Known Implementing Classes:
    RowReaderImpl

    public interface RowReader
    LineReaders reads rows from the CSV file and returns those all at once, or one by one if desired.
    Author:
    Robert Bor
    • Method Detail

      • readRows

        List<Row> readRows()
        Reads all rows from the file and returns them as a List. After this, the RowReader will be finished
        Returns:
        all Rows read from the Reader
      • readRow

        Row readRow()
        Reads a single row from the file and returns this. The RowReader will keep track of its state.
        Returns:
        Row read from the Reader
      • getCurrentLine

        int getCurrentLine()
        Returns the line from which the row was read. Note that a line is seen as a legitimate CSV row, not necessarily a printable line (unless multi-lines are used, these values are the same).
        Returns:
        current line number
      • isFinished

        boolean isFinished()
        States whether the Reader is done with the file
        Returns:
        true if file is finished
      • readHeader

        Header readHeader()
        Returns the first readable line of the CSV file as header, regardless if useHeader==true.
        Returns:
        header
      • getHeader

        Header getHeader()
        Returns the header of the CSV file. Only possibly returns a value when useHeader==true
        Returns:
        header or null if the useHeader==false
      • getRowInstructions

        RowInstructions getRowInstructions()
        The set of instructions for dealing with rows
        Returns:
        row instructions