//使用字符流
public void bufferedReadTest() throws IOException{
FileReader fr = new FileReader("d:/mi.txt");BufferedReader br = new BufferedReader(fr);
String str = null;
while((str=br.readLine()) != null){
System.out.println(str);
}
br.close();
fr.close();
}
//使用字节流
public void readFile()throws IOException{
FileInputStream fis = new FileInputStream("d:/mi.txt");
BufferedInputStream bis = new BufferedInputStream(fis);
int value = -1;
while((value=bis.read()) != -1){
System.out.println((char)value);
}
bis.close();
fis.close();
}