• Post Reply Bookmark Topic Watch Topic
  • New Topic

Differnce between bytes and character streams  RSS feed

 
Jac Jones
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

could somebody explain the difference between byte and character streams, and where they are applicable to be used?

thanks,

Jac
 
Stan James
(instanceof Sidekick)
Ranch Hand
Posts: 8791
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Streams read and write bytes without changing them at all. You can read an image or sound file or unknown document type and process the raw bytes or write them back out to another stream. Readers read unicode characters which are (usually? always?) two bytes wide. Google for more on unicode and character encoding - it's a big topic. Readers often convert between unicode and ASCII one-byte-wide characters so transparently that I've never bothered to figure out just how they do it.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!