java读取csv文件

2017-08-14  本文已影响0人  泽林呗
public static void main(String[] args) {
        try {
            DataInputStream in = new DataInputStream(new FileInputStream(new File("/home/hadoop/123/16-2016-05-26--2016-05-28.csv-utf8")));
            BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(in,"UTF-8"));
            String stemp;
            while((stemp =bufferedReader.readLine()) != null){
                System.out.println(stemp);
            }
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
上一篇下一篇

猜你喜欢

热点阅读