+ AtomicInteger count = new AtomicInteger(0);
+ consumeCSV(source, delim, firstAsHeader, t -> {
+ results.add(t);
+ int current = count.incrementAndGet();
+ return current < rowAmount;
+ });
+ return results;
+ }
+
+ public static void consumeCSV(Path source, char delim, boolean firstAsHeader, Function<CSVRecord, Boolean> consumer) throws IOException {