All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.csveed.row.RowReader Maven / Gradle / Ivy

Go to download

Java toolkit for mapping CSV-to-Bean mapping and vice versa. Redirection to Introduction in 5 seconds!

There is a newer version: 0.8.2
Show newest version
package org.csveed.row;

import org.csveed.api.Header;
import org.csveed.api.Row;

import java.util.List;

/**
* LineReaders reads rows from the CSV file and returns those all at once, or one by one if desired.
* @author Robert Bor
*/
public interface RowReader {

    /**
    * Reads all rows from the file and returns them as a List. After this, the RowReader will be finished
    * @return all Rows read from the Reader
    */
    public List readRows();

    /**
    * Reads a single row from the file and returns this. The RowReader will keep track of its state.
    * @return Row read from the Reader
    */
    public Row readRow();

    /**
    * 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).
    * @return current line number
    */
    public int getCurrentLine();

    /**
    * States whether the Reader is done with the file
    * @return true if file is finished
    */
    public boolean isFinished();

    /**
    * Returns the first readable line of the CSV file as header, regardless if useHeader==true.
    * @return header
    */
    public Header readHeader();

    /**
    * Returns the header of the CSV file. Only possibly returns a value when useHeader==true
    * @return header or null if the useHeader==false
    */
    public Header getHeader();

    /**
    * The set of instructions for dealing with rows
    * @return row instructions
    */
    public RowInstructions getRowInstructions();

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy