> ... java.nio provides the
> java.nio.charset.Charset.availableCharsets method for
> doing this, but as far as I can tell there is no
> comparable method for java.io, and
"I was under the impression that, under the hood,
java uses java.nio for all its charset needs. "
Indeed this is what some sources would lead one to believe, but it
isn't true. For instance, I successfully created an InputStreamReader
using the encoding CP918. If in the same program I evaluate
java.nio.charset.Charset.isSupported() for this encoding, it returns
false. This behavior is consistent with the information on this web
page:http://java.sun.com/j2se/1.3/docs/guide/intl/encoding.doc.html,
according to which java.io and java.nio support different sets of
encodings. Roughly speaking, java.nio supports the various national and
international standards, while java.io adds various Microsoft and IBM
codepages.
Roedy Green - 28 Oct 2005 20:47 GMT
>Roughly speaking, java.nio supports the various national and
>international standards, while java.io adds various Microsoft and IBM
>codepages.
Is the code that implements them radically different?

Signature
Canadian Mind Products, Roedy Green.
http://mindprod.com Java custom programming, consulting and coaching.
Thomas Schodt - 16 Jan 2006 19:35 GMT
> "I was under the impression that, under the hood,
> java uses java.nio for all its charset needs. "
[quoted text clipped - 5 lines]
> false. This behavior is consistent with the information on this web
> page:http://java.sun.com/j2se/1.3/docs/guide/intl/encoding.doc.html
Well, no surprise, as Java 1.3 predates the java.nio package.
The 1.4.2 and 1.5 equivalent URLs exist and suggest that
the java.nio, java.io and java.lang APIs support the same encoding sets.