public static void main(String[] args)throws IOException {
String path = "d:/data.txt";
File file = new File(path);
BufferedReader in=new BufferedReader(new FileReader(file));
String str;
while((str=in.readLine())!=null) //一行行的讀取內容
{
System.out.println(str);
}
}