Team LiB
Previous Section Next Section

CharsetProviderjava.nio.charset.spi

Java 1.4

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( );  
}

    Team LiB
    Previous Section Next Section