dinosaur wrote:
> I read your notes and I have a question. What is the difference between
> InputStream and
> InputStreamReader? Because I found that both of them read users' input in
> ASCII values but not
> character
InputStream:
A low-level input stream reads bytes from an input device and returns bytes
to its caller. So basicly this is an abstract calss that defines the basic
functionality for reading an unstructured sequence of bytes.
InputStreamReader:
Is like a filter input stream. It reads bytes from the InputStream and
returns Unicode characters. It is a "bridge" that converts bytes to
characters. Remember, that in Unicode a charcter is not a byte!
Hope this helps,
Herman
--
Suse Linux Professional 8.1 on Athlon 1.1 Ghz 512 Mb
Anti Spam = remove the "dot" and the "at"
Registered Linux User #264690
|