• Post Reply Bookmark Topic Watch Topic
  • New Topic

Simple Stream/Reader definition  RSS feed

 
Doug McGrath
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is it fair to say that Streams are for reading/writing binary data and that Readers are for reading/writing ASCII (or UTF) data? If not, then please give me some idea of why I would choose one over the other.
 
David Peterson
author
Ranch Hand
Posts: 154
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, streams are for bytes.
Readers and Writers are for characters. They perform conversions between Unicode (the representation used internally by Java) and other byte representations of characters.
David
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!