- import java.io.BufferedReader;
- import java.io.FileInputStream;
- import java.io.FileNotFoundException;
- import java.io.IOException;
- import java.io.InputStreamReader;
- import java.io.UnsupportedEncodingException;
- public class Main {
- public static void main(String[] args) throws IOException, FileNotFoundException {
- InputStreamReader isr = new InputStreamReader(new FileInputStream("C:\\eclipse\\workspace\\D20180623\\src\\2.csv"),"UTF-8");
- BufferedReader br = new BufferedReader(isr);
- while(br.ready())
- {
- System.out.println(br.readLine());
- }
- isr.close();
- }
複製代碼 |