This week's book giveaways are in the Refactoring and Agile forums.
We're giving away four copies each of Re-engineering Legacy Software and Docker in Action and have the authors on-line!
See this thread and this one for details.
Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization 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