Re: What is the purpose of all these Streams?

From: FISH (joeking_at_merseymail.com)
Date: 11/28/03


Date: 28 Nov 2003 03:09:52 -0800


"Anthony Borla" <ajborla@bigpond.com> wrote in message news:<XTmxb.29616$aT.1332@news-server.bigpond.net.au>...

> 'InputStream'-based classes read 8 bit bytes, while 'Reader'-based classes
> read 16 bit characters.

At the risk of nit-picking, I think this needs a bit of clarification:
The old 1.02 'stream' classes used to have methods which returned
strings of 16 bit chars - but the way they translated the bytes in
the source data to Unicode characters was too primitive. The new
'reader' classes actually know how to process Utf type data, meaning
that they can cope when they encounter chars which are outside the
usual one byte (seven bit) ASCII range.

So actually it is more accurate to say the 'reader'-based classes
read 8-or-more bit characters, translating them into 16 bit Unicode.

> I strongly urge you to check out the Sun tutorials on streams, located at:
>
> http://java.sun.com/docs/books/tutorial/essential/io/index.html

That's good advice. I second that... :-)

-FISH- ><>



Relevant Pages

  • Re: bonding: cannot remove certain named devices
    ... chars) chars? ... Don't forget unicode characters! ... I only thought about the kernel ...
    (Linux-Kernel)
  • Re: unix filename restriction
    ... underscore _ and the dot. ... You could use other characters, ... never met a *human* defined path of more than 80 chars (most of the ... If you want to be very sure, limit your filename to the DOS limit of 8 ...
    (comp.os.linux.development.apps)
  • Re: 128 bit password
    ... Joe Richards Microsoft MVP Windows Server Directory Services ... Assumption would be that it would get truncated at 127/128 characters... ... then these are 16 bit chars. ...
    (microsoft.public.security)
  • [4E] Keep on the Shadowfell - pregen chars
    ... Played our first game of 4E at home. ... We used the pre-gen chars. ... To put it bluntly, they hated the characters. ... I got some funny looks when they dropped a kobold minion with 2 points ...
    (rec.games.frp.dnd)
  • Re: HELP!!
    ... to memory you "own" (i.e. it's either an array of chars you defined ... and has it at least room for FILES characters? ... sprintf (txtFile, "%c", c); ...
    (comp.lang.c)