package cn.itcast_03;
import java.io.BufferedInputStream;
import java.io.FileInputStream;
import java.io.IOException;
public class BufferedInputStream读取数据 {
public static void main(String[] args) throws IOException {
BufferedInputStream bos = new BufferedInputStream(
new FileInputStream("bod.txt"));
int by = 0;
while((by = bos.read()) != -1) {
System.out.println((char)by);
}
byte[] bys = new byte[1024];
int len = 0;
while((len = bos.read(bys)) != -1) {
System.out.println(new String(bys , 0 , len));
}
bos.close();
}
}