BufferedInputStream helps in increasing the performance while reading less number of bytes from a resource. Unlike BufferedInputStream if we use any other InputStream each time when we perform read operation we generate a system call to the operating system which in turn executes many other system instructions. BufferedInputStream internally has a buffer to store the bytes and it stores all the bytes in to it so we no need to generate frequent system calls to read from the resource and also unlike other InputStreams BufferedInputStream reads many bytes at a time.
public class BufferedInputStream
BufferedInputStreamDemo CODE class BufferedInputStreamDemo OUTPUT Available Bytes : 12 DESCRIPTION At THINGS TO TRY
|