Net-informations.com
SiteMap  | About    

BufferedReader Class

How to use Java Bufferedreader

Buffered readers are preferable for more demanding tasks, such as file and streamed readers. It optimize input and output by reducing the number of calls to the native API . Buffering the reads allows large volumes to be read from disk and copied to much faster RAM (Random Access Memory) to increase performance over the multiple network communications or disk reads done with each read command otherwise.

Buffer Size

The buffer size may be specified, or the default size may be used. The default is large enough for most purposes. The default buffer size of 8192 chars can be overridden by the creator of the stream.

The following Java program read input from console and display it using BufferedReader:

The following java program read text from an external file and display the text using BufferedReader:









net-informations.com (C) 2017    Founded by raps mk
All Rights Reserved. All other trademarks are property of their respective owners.