I have a large .csv
file (about 300 MB), which is read from a remote host, and parsed into a target file, but I don\'t need to copy all the lines to the target
This is a late response, but you CAN use a BufferedReader
with the CSVParser:
try (BufferedReader reader = new BufferedReader(new FileReader(fileName), 1048576 * 10)) {
Iterable records = CSVFormat.RFC4180.parse(reader);
for (CSVRecord line: records) {
// Process each line here
}
catch (...) { // handle exceptions from your bufferedreader here