Retrieve row number with supercsv
问题 Is there a way with the super-csv library to find out the row number of the file that will be processed? In other word, before i start to process my rows with a loop: while ((obj = csvBeanReader.read(obj.getClass(), csvModel.getNameMapping(), processors)) != null) { //Do some logic here... } Can i retrieve with some library class the number of row contained into the csv file? 回答1: No, in order to find out how many rows are in your CSV file, you'll have to read the whole file with Super CSV