Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > InputStream & InputStreamReader

Reply
Thread Tools

InputStream & InputStreamReader

 
 
dinosaur
Guest
Posts: n/a
 
      09-21-2003
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


 
Reply With Quote
 
 
 
 
Herman Timmermans
Guest
Posts: n/a
 
      09-21-2003
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
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
confused: Socket InputStream != ServerSocker InputStream R Java 5 03-13-2005 07:26 AM
InputStreamReader and charsets Mike Lischke Java 5 07-12-2004 11:08 PM
Stupid InputStreamReader/character question Rick Genter Java 1 11-10-2003 08:28 PM
InputStreamReader reads data only partially Markus Barchfeld Java 5 11-06-2003 12:00 PM
BufferedReader InputStreamReader question Robert Java 0 10-05-2003 07:34 PM



Advertisments