Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / March 2007

Tip: Looking for answers? Try searching our database.

what is the different between byte stream and character stream?

Thread view: 
dolphin - 17 Mar 2007 14:37 GMT
Hi !what is the different between byte stream and character stream?
Joshua Cranmer - 17 Mar 2007 14:45 GMT
> Hi !what is the different between byte stream and character stream?

Read the javadocs for java.io.InputStream, java.io.Reader, and probably
the package for java.io as well.
Thomas Kellerer - 17 Mar 2007 15:31 GMT
dolphin wrote on 17.03.2007 14:37:
> Hi !what is the different between byte stream and character stream?

A byte stream is for bytes (raw data) and a character stream is for character
data. As simple as that.

Your questions seems to indicate that you think a byte and a character is the
same. It is not.
Lew - 17 Mar 2007 16:32 GMT
> dolphin wrote on 17.03.2007 14:37:
>> Hi !what is the different between byte stream and character stream?
[quoted text clipped - 4 lines]
> Your questions seems to indicate that you think a byte and a character is the
> same. It is not.

There is also Object{Input|Output}Stream which is for Objects, ...

When you get into java.nio you have Buffer and its type-specific descendants.

-- Lew
Thomas Fritsch - 18 Mar 2007 14:58 GMT
Thomas Kellerer schrieb:

> dolphin wrote on 17.03.2007 14:37:
>
[quoted text clipped - 5 lines]
> Your questions seems to indicate that you think a byte and a character is the
> same. It is not.

Additional note to the OP:
a byte is of range [-128...127], a character is of range [0...65535].

Signature

Thomas

Mark Space - 17 Mar 2007 16:37 GMT
> Hi !what is the different between byte stream and character stream?

A byte stream is just that -- raw bytes.

A character stream is for a given character set.  It could be fixed
width characters (one or two bytes) or some form of variable width like
UTF-8.  I think Java uses variable width internally, but it has readers
for many different character streams built into the IO subsystem.
alireza.jn@gmail.com - 18 Mar 2007 13:01 GMT
> Hi !what is the different between byte stream and character stream?


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.