Here is the line i am using currently
File booleanTopicFile;
// booleanTopicFile is csv file uploaded from form
CSVReader csvReader = new CSVReader(new InputStreamReader(new FileInputStream(booleanTopicFile), "UTF-8"));
Want to skip the first line of the csv which contains headings. I dont want to use any separator as except the default one comma(,) which is already available in default constructor. In parameterized constructor there is a option to skip no. of lines but how to deal with the 2nd and 3rd param of the constructor.
CSVReader csvReader = new CSVReader(new InputStreamReader(Reader reader, char c, char c1, int index);
-- Thanks
CSVReaderBuilderand itswithSkipLines()method to return aCSVReaderwith the desired number of lines to skip. This design leverages the library’s intended functionality for this purpose rather than manually invokingreadLine()and discarding its output. On that note, @svz, ignoring a method's return value is generally seen as an anti-pattern and can hide potential issues. UsingCSVReaderBuildermakes the intent clear.