package text;
import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
public class Buff5 {
public static void main(String[] args) {
BufferedReader bos=null;
try {
// 创建字符缓冲流对象
bos=new BufferedReader(new FileReader("d:\\IO\\ac.txt"));
String len=null;
// 判断bos不能为null
while ((len=bos.readLine())!=null){
System.out.println( len);
}
} catch (Exception e) {
e.printStackTrace();
}finally{
try {
if(bos!=null){
// 关闭流
bos.close();
}
} catch (IOException e) {
e.printStackTrace();
}
}
}
}