Difference between InputStream and BufferedInputStream (is there?)
843790Apr 23 2008 — edited Apr 23 2008Hello folks,
The documentation for BufferedInputStream states, "BufferedInputStream adds functionality to another input stream-namely, *the ability to buffer the input* and to support the mark and reset methods".
Now I understand that BufferedInputStream implements the mark() and reset() methods of InputStream...that's fine. My doubt is in the claim *"..the ability to buffer the input"* -- I dont see any difference in the various read() methods of InputStream and BufferedInputStream.... For example, even the InputStream class has the read(byte[],i,length) method which is a buffer afterall.
So my question is, where exactly is the Buffering taking place in BufferedInputStream that makes it different from InputStream.