62,620
社区成员
发帖
与我相关
我的任务
分享
/**
* The internal buffer array where the data is stored. When necessary,
* it may be replaced by another array of
* a different size.
*/
protected volatile byte buf[];
这个就是BufferedInputStream所谓的小桶了,Buffered就主要体现在这个小桶上
所有的缓冲数据都缓存在这个byte数组上,供其他方法使用,空间换时间,如果没有这个缓冲,必须再从输入流中按字节读取,时间效率将大大降低。