Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Home Answers Viewqa Java-Beginners Why bufferedreader is used in java?

Have Programming Question? Ask it here!
 
 
 


Java Coder
Why bufferedreader is used in java?
1 Answer(s)      a year and 5 months ago
Posted in : Java Beginners


Hi,

What is the use of BufferedReader class in Java? why bufferedreader is used in java?

It will be great if anyone can give me the example code of BufferedReader class in java.

Thanks


Advertisement
View Answers

February 8, 2013 at 11:56 PM


Hello,

The BufferedReader class is present in the java.io package:

java.io.BufferedReader

This class is used for reading the text-input stream in Java efficiently. This java.io.BufferedReader class buffers the characters which results in the high efficiency of the application.

The java.io.BufferedReader class can be used to read the large text files ( ranging in many GB's).

The java.io.BufferedReader class is very flexible and it allows the developers to specify the size of buffer. The default buffer size of this class is 8192 chars. Which can be increased also. This buffer size is sufficient in general programming.

You can see the example at the tutorial Java Read File Line by Line - Java Tutorial.

Thanks



Related Tutorials/Questions & Answers:
Advertisements
Advertisements
 

 

 

DMCA.com