CSVRowIterator

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

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

Functions

Link copied to clipboard
open override fun close()
Link copied to clipboard
open fun forEachRemaining(p0: Consumer<in CSVRecord>)
Link copied to clipboard
open operator override fun hasNext(): Boolean
Link copied to clipboard
open operator override fun next(): CSVRecord