This week's book giveaway is in the Flex forum.
We're giving away four copies of Flex 4 in Action and have Tariq Ahmed, Dan Orlando, John C. Bland II & Joel Hooks on-line!
See this thread for details.
[Logo] JavaRanch » JavaRanch Saloon
  Search | FAQ | Recent Topics | Hot Topics
Register / Login


Win a copy of Flex 4 in Action this week in the Flex forum!
Reply Bookmark it! Watch this topic JavaRanch » Forums » Java » Java in General
 
RSS feed
 
New topic
Author

Difference between Reader/Writer and InputStream/Output Stream?

santu das
Greenhorn

Joined: Jan 02, 2009
Messages: 4

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

Joined: Aug 01, 2008
Messages: 44

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.

Thanks & Regards
Eshu Khare
santu das
Greenhorn

Joined: Jan 02, 2009
Messages: 4

thanks for your inputs
Fred Hamilton
Ranch Hand

Joined: May 13, 2009
Messages: 670

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.
 
 
 
Reply Bookmark it! Watch this topic JavaRanch » Forums » Java » Java in General
 
RSS feed
 
New topic
replay challenge