Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

FileReader and FileInputStream

 
abhay jain
Ranch Hand
Posts: 130
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
FileReader class reads 16 bit character, FileInputStream class used for 8 bit byte


can you please give me an example that how this 8 and 16 bit or byte and char difference can matter to a program's ability of reading
 
Wouter Oet
Saloon Keeper
Posts: 2700
IntelliJ IDE Opera
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Readers read characters. Streams read bytes. They do to two different things. One cannot be used instead of the other.

So it has nothing to do with the readability of your program. It's about which functionality is required.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic