Retrieves a charset for the given charset name.
Retrieves a charset for the given charset name.
The name of the requested charset; may be either a canonical name or an alias
A charset object for the named charset, or null if the named charset is not supported by this provider
Creates an iterator that iterates over the charsets supported by this provider.
Creates an iterator that iterates over the charsets supported by this
provider. This method is used in the implementation of the
java.nio.charset.Charset.availableCharsets()
method.
The new iterator
This implements a CharsetProvider that implements Daffodil's support for less-than-byte-sized encodings. However, it seems hard to get additional encodings to actually be recognized by the JVM, as if this extension mechanism was really intended for JVM maintainers to use, but not for end-user jar libraries to use.
Also, we have to have a proxy class BitsCharset, and we have to produce those for all charsets, rather than being able to extend java.nio.charset.Charset - because that's full of final methods.
Rather than contort to try to get this working, We simply call this directly from a CharsetUtils method that we use instead of Charset.forName.