I know both FileReader and FileInputStream are used to read data from a file in Java. but don't know difference between them and which one appropriate in which case? I surfed internet but not found satisfied answer?
Asked
Active
Viewed 1,193 times
-1
-
Also Have a look into http://javarevisited.blogspot.in/2014/04/difference-between-fileinputstream-and-filereader-in-java.html – Unknown May 19 '16 at 11:57
-
Possible duplicate: [FileReader vs FileInputStream](http://stackoverflow.com/questions/5155226/fileinputstream-vs-filereader) The correct answer tells the main difference between these streams. Also recommend to read about char and byte streams. – pvxe May 19 '16 at 12:00
-
Did you consider consulting the documentation that is provided for the purpose? – user207421 May 19 '16 at 12:06
-
this link will help you http://java67.blogspot.in/2016/03/difference-between-filereader-vs.html#more – Akshay Pethani May 19 '16 at 12:29
1 Answers
1
From oracle docs:
A FileInputStream obtains input bytes from a file in a file system. What files are available depends on the host environment. FileInputStream is meant for reading streams of raw bytes such as image data. For reading streams of characters, consider using FileReader.

ctotolin
- 183
- 5