返回列表 發帖
  1. package bbs.istak.org.tw;

  2. import java.io.BufferedReader;
  3. import java.io.File;
  4. import java.io.FileInputStream;
  5. import java.io.FileNotFoundException;
  6. import java.io.IOException;
  7. import java.io.InputStreamReader;
  8. import java.io.UnsupportedEncodingException;

  9. public class haung20180702 {
  10.         public static void main(String[] args) {
  11.              File file = new File("C:/a/b/c/2.csv");               
  12.                  BufferedReader br;
  13.                 try {
  14.                         br = new BufferedReader(new InputStreamReader(new FileInputStream(file.getAbsolutePath()),"UTF-8"));
  15.                          while(br.ready())
  16.                  {
  17.                      System.out.println(br.readLine());
  18.                  }
  19.                  br.close();       
  20.                 } catch (Exception e) {}         
  21.                  
  22.                
  23.                
  24.         }

  25. }
複製代碼

TOP

返回列表