Nezteb
07/31/2019, 4:23 PMOpenCSV
and it reads line-by-line of a CSV file via a csvObject.readMap()
. I want to go through and collect each line into a ArrayList
. readMap
is done when it hits a null (empty line). What’s the best way to repeatedly call readMap
and then put the result in an array?
do {
val line = csv.readMap()
csvLines.add(line)
} while (line != null)
this works but then the list has a null in it. i’d rather not have to do two null checks if possible.