The java.nio.charset.spi Package

The java.nio.charset.spi package contains a service-provider class to create a new charset class. This package contains only one class, CharSetProvider.


To learn more about java.nio.charset.spi package, see:


The CharSetProvider class is a subclass of the Charset class. This class takes no arguments in the default constructor. You can look up the Charset provider with the help of the loaded context class of the current thread. The methods used in the CharSetProvider class are:

  • charsetForName() : Returns an object of the Charset class. The charsetForName() method takes charsetName of String type as an input parameter.

  • charsets() : Returns a collection of objects of the Charset class supported by the provider.

Java InstantCode. Developing Applications Using Java NIO
Java InstantCode. Developing Applications Using Java NIO
Year: 2004
Pages: 55 © 2008-2017.
If you may any questions please contact us: