InputStream & InputStreamReader

D

dinosaur

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
 
H

Herman Timmermans

dinosaur said:
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,007
Latest member
obedient dusk

Latest Threads

Top