java.lang.Object
org.csveed.row.RowReaderImpl
-
Constructor Summary
ConstructorDescriptionRowReaderImpl
(Reader reader) Instantiates a new row reader impl.RowReaderImpl
(Reader reader, RowInstructions instructionsInterface) Instantiates a new row reader impl. -
Method Summary
Modifier and TypeMethodDescriptionint
Returns the line from which the row was read.Returns the header of the CSV file.int
Gets the max number of columns.The set of instructions for dealing with rows.boolean
States whether the Reader is done with the file.protected void
Log settings.protected Line
Read bare line.Returns the first readable line of the CSV file as header, regardless if useHeader==true.readRow()
Reads a single row from the file and returns this.readRows()
Reads all rows from the file and returns them as a List.
-
Constructor Details
-
RowReaderImpl
Instantiates a new row reader impl.- Parameters:
reader
- the reader
-
RowReaderImpl
Instantiates a new row reader impl.- Parameters:
reader
- the readerinstructionsInterface
- the instructions interface
-
-
Method Details
-
readRows
-
readRow
-
getCurrentLine
public int getCurrentLine()Description copied from interface:RowReader
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).- Specified by:
getCurrentLine
in interfaceRowReader
- Returns:
- current line number
-
getHeader
-
getMaxNumberOfColumns
public int getMaxNumberOfColumns()Gets the max number of columns.- Returns:
- the max number of columns
-
readHeader
Description copied from interface:RowReader
Returns the first readable line of the CSV file as header, regardless if useHeader==true.- Specified by:
readHeader
in interfaceRowReader
- Returns:
- header
-
isFinished
public boolean isFinished()Description copied from interface:RowReader
States whether the Reader is done with the file.- Specified by:
isFinished
in interfaceRowReader
- Returns:
- true if file is finished
-
logSettings
protected void logSettings()Log settings. -
readBareLine
-
getRowInstructions
Description copied from interface:RowReader
The set of instructions for dealing with rows.- Specified by:
getRowInstructions
in interfaceRowReader
- Returns:
- row instructions
-