• Post Reply Bookmark Topic Watch Topic
  • New Topic

Byte oriented versus Character oriented  RSS feed

 
pawan chopra
Ranch Hand
Posts: 419
jQuery Mac Objective C
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

I have been searching on net but didn't get the answer for the following question.

Why do we have these two kind of classes when both are serving the same purpose?
(1) Byte oriented.
(2) Character oriented.

When we can use FileInputStream to read a file then why java people created FileReader?

I hope it's not a silly question.






 
Joe Ess
Bartender
Posts: 9426
12
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Bytes are not directly correlated to characters in Java. Since Java characters are Unicode, a single character may consist of several bytes. For more on how Unicode works, have a look here.
 
Tanzy Akhtar
Ranch Hand
Posts: 110
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Joe, for sharing such a informative link.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!