Interface BeanReader<T>

  • Type Parameters:
    T - the bean class into which the rows are converted
    All Known Implementing Classes:

    public interface BeanReader<T>

    The BeanReader is responsible for reading CSV rows and converting those into beans. There are two ways to initialize a BeanReaderImpl:

    • Point it to class. The org.csveed.annotations in the class are read, as is the order of the properties within the class.
    • Roll your own. Pass a BeanInstructions implementation with your own configuration settings
    Robert Bor
    • Method Detail

      • readBeans

        List<T> readBeans()
        Reads all rows from the file and return these as beans.
        all beans read from the Reader
      • readBean

        T readBean()
        Reads a single row and returns this as a bean. The RowReader will keep track of its state.
        Bean read from the Reader
      • readHeader

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

        int getCurrentLine()
        Returns the line from which the bean 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).
        current line number
      • isFinished

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

        RowReader getRowReader()
        Returns the underlying line reader for the bean reader
        the underlying line reader
      • getBeanInstructions

        BeanInstructions getBeanInstructions()
        The set of instructions for dealing with beans
        bean instructions