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.

Note  

To learn more about java.nio.charset.spi package, see: http://java.sun.com/j2se/1.4.2/docs/api/java/nio/charset/spi/package-summary.html

CharSetProvider

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
ISBN: N/A
EAN: N/A
Year: 2004
Pages: 55

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net