> 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.
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
> 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.
> Hi !what is the different between byte stream and character stream?