As we have read about the BufferedInputStream class that lets you read characters from a stream and stores it in an internal buffer. Lets see an example that reads the contains of the existed file.
The given example uses the BufferedInputstream class that reads the bytes from the input stream. The input stream is a file "Filterfile.txt" from which the data is read in form of a byte through the read( ) method. The read( ) method reads the byte from the file that is converted into the character-form.
Output of the Program:
This is a text file
Rs. 20,000 US$ 300
Today: Rs. 10,000 US$150
Course Duration: 30 hrs
Posted on: June 8, 2009 If you enjoyed this post then why not add us on Google+? Add us to your Circles