read csv file

上一篇 / 下一篇  2012-03-02 18:01:00 / 个人分类:java

  public ArrayList<String> getValuesCsv() throws IOException{

        CSVReader reader = new CSVReader(new FileReader("selenium.csv"),','
);
        String[] nextLine = null;
        ArrayList<String> arrayValues = new ArrayList<String>();

        nextLine = reader.readNext();

        do{

            arrayValues.add(nextLine[0]);

        }while ((nextLine = reader.readNext()) != null);

        return arrayValues;
    }


Collections.sort(arrayValues);

TAG:

 

评分:0

我来说两句

日历

« 2024-02-14  
    123
45678910
11121314151617
18192021222324
2526272829  

数据统计

  • 访问量: 4654
  • 日志数: 14
  • 建立时间: 2012-02-29
  • 更新时间: 2012-03-16

RSS订阅

Open Toolbar