Name
CharsetProvider
Synopsis
System programmers developing new Charset
implementations should implement this class to make those charsets
available to the system. charsetForName( ) should
return a Charset instance for the given name.
charsets( ) should return a
java.util.Iterator that allows the caller to
iterate through the set of Charset objects defined
by the provider.
A CharsetProvider and its associated
Charset implementations should be packaged in a
JAR file and made available to the system in the
jre/lib/ext/ extensions directory (or some other
extensions location.) The JAR file should contain a file named
META-INF/services/java.nio.charset.spi.CharsetProvider
which contains the class name of the
CharsetProvider implementation.
public abstract class CharsetProvider { // Protected Constructors protected CharsetProvider( ); // Public Instance Methods public abstract java.nio.charset.Charset charsetForName(String charsetName); public abstract java.util.Iterator<java.nio.charset.Charset> charsets( ); }
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access