---
title: "Difference between buffered reader and file reader"  
description: "Difference between buffered reader and file reader"  
author: "Anonymous User"  
published: 2015-03-16  
updated: 2015-03-16  
canonical: https://www.mindstick.com/forum/23020/difference-between-buffered-reader-and-file-reader  
category: "java"  
tags: ["java"]  
reading_time: 1 minute  

---

# Difference between buffered reader and file reader

can [anyone explain](https://www.mindstick.com/forum/34220/can-anyone-explain-me-about-off-page-activity) me the [difference](https://www.mindstick.com/articles/157114/good-news-or-bad-news-and-the-difference-is) between the [class](https://www.mindstick.com/blog/165/generic-class-in-c-sharp) [BufferedReader](https://www.mindstick.com/blog/11121/java-i-o-character-streams-and-buffered-reader-writers) and FileReader ? and which one to use when i want to read a [text file](https://www.mindstick.com/forum/12828/converting-a-text-file-to-an-array-in-java) Thank you

## Replies

### Reply by Anonymous User

And as per question for reading a text file you should use **BufferedReader** because Scanner hides IOException while BufferedReader throws it immediately.\
**BufferedReader** is synchronized and Scanner is not.\
**Scanner:**- is used for parsing tokens from the contents of the stream.\
BufferedReader:- BufferedReader just reads the stream.

### Reply by Anonymous User

- **FileReader** is just a Reader which reads a [file](https://www.mindstick.com/articles/59/encrypting-and-decrypting-files-using-c-sharp), using the platform-default encoding (urgh)\
- **BufferedReader** is a wrapper around another Reader, adding buffering and the ability to read a line at a time\
- **Scanner** reads from a variety of different sources, but is typically used for interactive input. Personally I find the API of Scanner to be pretty painful and obscure.\

\
To read a [text](https://www.mindstick.com/blog/301635/did-people-reinvent-texting-to-express-the-full-range-of-emotions) file, I would suggest using a **FileInputStream** wrapped in an **InputStreamReader** (so you can specify the encoding) and then wrapped in a **BufferedReader** for buffering and the ability to read a line at a time.


---

Original Source: https://www.mindstick.com/forum/23020/difference-between-buffered-reader-and-file-reader

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
