Java BufferedReader

Contributor(s): Matthew Haughn

Java BufferedReader is a public Java class that reads text, using buffering to enable large reads at a time for efficiency, storing what is not needed immediately in memory for later use.

Buffered readers are preferable for more demanding tasks, such as file and streamed readers. Buffering the reads allows large volumes to be read from disk and copied to much faster RAM to increase performance over the multiple network communications or disk reads done with each read command otherwise. Java BufferedReader is preferable anywhere costly reads are likely to be an issue, such as FileReaders and InputStreamReaders, for example:

  BufferedReader in

= new BufferedReader(new FileReader(""));

buffers the input from the file so that each read() or readLine() invocation does not individually cause reads from the file, reducing potential efficiency.

Java BufferedReader has existed since Java Development Kit 1.1.

This was last updated in July 2016

Continue Reading About Java BufferedReader

Dig Deeper on Java Development Tools

Join the conversation

1 comment

Send me notifications when other members comment.

Please create a username to comment.

Still learning java on my own. Thanks for the tips and this one may come helpful down the road..