构造方法:
public BufferedInputStream(InputStream in):
public BufferedInputStream(InputStream in,int size):
//public BufferedInputStream(InputStream in):
//封装数据
BufferedInputStream bis=new BufferedInputStream(new FileInputStream("a.txt"));
//读取数据
// int len;
// while((len=bis.read())!=-1){
// System.out.print((char)len);
// }
int len;
byte[] bt=new byte[1024];
while((len=bis.read(bt))!=-1){
System.out.print(new String(bt,0,len));
}
//释放资源
bis.close();