Qus: What is the purpose of using Buffered Input Stream and Buffered Output Stream classes?
The BufferedInputStream provides the functionality to another input stream for faster reading of data. The BufferedInputStream class has the ability to buffer the input and to support the mark and reset methods. It extends the functionality of FileInputStream.
BufferedOutputStream class is used for buffering an output stream. It internally uses buffer to store data. It adds more efficiency than to write data directly into a stream. So, it makes the performance fast.For adding the buffer in an OutputStream, use the BufferedOutputStream class