M
Marc Twain
I'm puzzled. Some books recommend the use of BufferedInputStream when
reading from a file, but they do not explain why. How could a buffer,
which is essentially a cache, improve performance? After all a file
can only be fully read once the last byte of data was read from disk,
which will happen at the same time whether you buffer the input or
not.
Obviously I must be wrong, could someone explain why?
Thanks,
AJ.
reading from a file, but they do not explain why. How could a buffer,
which is essentially a cache, improve performance? After all a file
can only be fully read once the last byte of data was read from disk,
which will happen at the same time whether you buffer the input or
not.
Obviously I must be wrong, could someone explain why?
Thanks,
AJ.