CSVRowIterator

class CSVRowIterator @JvmOverloads constructor(val pathToFile: Path, csvParser: CSVParser = CSVParser(FileReader(pathToFile.toFile()), CSVFormat.DEFAULT)) : Iterator<CSVRecord> , Closeable(source)

Returns an iterator to the rows of a csv file that may have the first row as a header of column labels and each subsequent row as the data for each column, e.g. "x", "y" 1.1, 2.0 4.3, 6.4 etc.

The user is responsible for closing the iterator when iteration is complete.

Parameters

pathToFile

the path to the file

Constructors

Link copied to clipboard
constructor(pathToFile: Path, csvParser: CSVParser = CSVParser(FileReader(pathToFile.toFile()), CSVFormat.DEFAULT))

Properties

Link copied to clipboard