FileInputStream f1 = new FileInputStream("1.txt"); 
BufferedInputStream buf = new BufferedInputStream(f1); 那么1.txt中的文件如何到缓冲区的啊

解决方案 »

  1.   

    就是用read()方法读咯. 
    BufferedInputStream只是针对普通的InputStream增加了一些辅助的功能.
    As bytes from the stream are read or skipped, the internal buffer is refilled as necessary from the contained input stream, many bytes at a time. 去看看JDK文档里面的说明吧. 
      

  2.   

       补充下:
         BufferedInputStream主要用来整行读取
      

  3.   

          发错,整行读取是BufferReader,不好意思