InputStream & InputStreamReader

Discussion in 'Java' started by dinosaur, Sep 21, 2003.

  1. dinosaur

    dinosaur Guest

    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
    dinosaur, Sep 21, 2003
    #1
    1. Advertising

  2. 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
    Herman Timmermans, Sep 21, 2003
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Robert
    Replies:
    0
    Views:
    3,042
    Robert
    Oct 5, 2003
  2. Markus Barchfeld

    InputStreamReader reads data only partially

    Markus Barchfeld, Nov 3, 2003, in forum: Java
    Replies:
    5
    Views:
    958
    Gordon Beaton
    Nov 6, 2003
  3. Rick Genter
    Replies:
    1
    Views:
    2,350
    Chris Berg
    Nov 10, 2003
  4. Mike Lischke

    InputStreamReader and charsets

    Mike Lischke, Jul 6, 2004, in forum: Java
    Replies:
    5
    Views:
    611
    Dale King
    Jul 13, 2004
  5. R
    Replies:
    5
    Views:
    2,091
    Kevin McMurtrie
    Mar 13, 2005
Loading...

Share This Page