• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

FileReader vs FileInputStream

 
jeevanandam palani
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
which is efficient to use FileReader or FileInputStream
 
Ulf Dittmer
Rancher
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to JavaRanch.

It's not a question of efficiency, it's a question of functionality. Streams work with binary data, while Readers (and Writers) work with character data. If binary data can be converted to character data (and not all binary data can), then you'll need to consider the encoding that was used to convert the character data to binary data in the first place.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic