如果csv某些行的格式出现问题
例如
[email protected],1159218269,,,,,,,,,,,,,
[email protected],tm8tm,,,,,,,,,,,,,
[email protected]
d,[email protected]
这样parser.hasmore就会自动跳过去的?
怎么解决?

解决方案 »

  1.   

    你 的hasmore方法 判断的理由是什么呢?是否可以改一下 呢?
      

  2.   

    //改成下面的这个试试看
    public boolean hasMore() throws IOException {
            currLine = csvParser.getLine();
            currLineNum = csvParser.getLastLineNumber();
            if (null == currLine)
                return false;
            return true;
      }