java读取csv文件

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();
        }
    }

你可能感兴趣的:(java读取csv文件)