Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Difference between Reader/Writer and InputStream/Output Stream?

 
santu das
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
what i understand is as follows:
the Reader/Writer is character oriented.But InputStream/Output Stream is byte oriented.
But still can anybody explain what does it actually mean?
Thanks in Advance..
 
eshu khare
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
The Reader/Writer class hierarchy is character-oriented, and the Input Stream/Output Stream class hierarchy is byte-oriented.
Basically there are two types of streams.Byte streams that are used to handle stream of bytes and character streams for handling streams of characters.In byte streams input/output streams are the abstract classes at the top of hierarchy,while writer/reader are abstract classes at the top of character streams hierarchy.
Hope this answers your question somehow.
 
santu das
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks for your inputs
 
Fred Hamilton
Ranch Hand
Posts: 684
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There are differrences in the way the information is actually stored. The following link contains an explanation
http://java.sun.com/docs/books/tutorial/essential/io/charstreams.html

read the paragraph just below the first example, in the section on Using Character Streams.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic