Class BeanReaderImpl<T>

    • Constructor Detail

      • BeanReaderImpl

        public BeanReaderImpl​(Reader reader,
                              Class<T> beanClass)
    • Method Detail

      • readBeans

        public List<T> readBeans()
        Description copied from interface: BeanReader
        Reads all rows from the file and return these as beans.
        Specified by:
        readBeans in interface BeanReader<T>
        Returns:
        all beans read from the Reader
      • readBean

        public T readBean()
        Description copied from interface: BeanReader
        Reads a single row and returns this as a bean. The RowReader will keep track of its state.
        Specified by:
        readBean in interface BeanReader<T>
        Returns:
        Bean read from the Reader
      • logSettings

        protected void logSettings()
      • getHeader

        protected Header getHeader()
      • readHeader

        public Header readHeader()
        Description copied from interface: BeanReader
        Returns the first readable line of the CSV file as header, regardless if useHeader==true.
        Specified by:
        readHeader in interface BeanReader<T>
        Returns:
        header
      • getCurrentLine

        public int getCurrentLine()
        Description copied from interface: BeanReader
        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).
        Specified by:
        getCurrentLine in interface BeanReader<T>
        Returns:
        current line number
      • isFinished

        public boolean isFinished()
        Description copied from interface: BeanReader
        States whether the Reader is done with the file
        Specified by:
        isFinished in interface BeanReader<T>
        Returns:
        true if file is finished
      • getRowReader

        public RowReader getRowReader()
        Description copied from interface: BeanReader
        Returns the underlying line reader for the bean reader
        Specified by:
        getRowReader in interface BeanReader<T>
        Returns:
        the underlying line reader
      • getBeanClass

        public Class<T> getBeanClass()