H
Harald Kirsch
I have some text originating from XML which does not
contain tags anymore but character references like "@" .
I thought about writing my own java.nio.charset.CharsetDecoder only
to find that this more or less forces me to also supply a my
own java.nio.charset.Charset class ... and probably a CharsetProvider ...
Since all I want is the conversion of "&64;" and the like
to a Java char I don't see the point of defining a Charset. The
CharsetDecoder alone would suit me well passed right into
a new InputStreamReader(InputStream, CharsetDecoder).
Certainly I misunderstand the importance of the connection between
CharsetDecoder and Charset and should choose a different route.
Should I implement my own Reader having the converions built in? This seems
equally odd.
Any other ideas?
Harald.
contain tags anymore but character references like "@" .
I thought about writing my own java.nio.charset.CharsetDecoder only
to find that this more or less forces me to also supply a my
own java.nio.charset.Charset class ... and probably a CharsetProvider ...
Since all I want is the conversion of "&64;" and the like
to a Java char I don't see the point of defining a Charset. The
CharsetDecoder alone would suit me well passed right into
a new InputStreamReader(InputStream, CharsetDecoder).
Certainly I misunderstand the importance of the connection between
CharsetDecoder and Charset and should choose a different route.
Should I implement my own Reader having the converions built in? This seems
equally odd.
Any other ideas?
Harald.