I am writing a parser code to read a .csv file and parse it to XML. This is the code I have and it works, except I would like it to skip the first line in the file. So I decided
List xmlLines = new BufferedReader(new FileReader(csvFile))
.lines()
.skip(1) //Skips the first n lines, in this case 1
.map(s -> {
//csv line parsing and xml logic here
//...
return xmlString;
})
.collect(Collectors.toList());