public abstract class CharsetICU extends Charset
A subclass of java.nio.Charset for providing implementation of ICU's charset converters.
This API is used to convert codepage or character encoded data to and
from UTF-16. You can open a converter with Charset.forName(java.lang.String) and forNameICU(java.lang.String). With that
converter, you can get its properties, set options, convert your data.
Since many software programs recogize different converter names for different types of converters, there are other functions in this API to iterate over the converter aliases.
| Modifier | Constructor and Description |
|---|---|
protected |
CharsetICU(String icuCanonicalName,
String canonicalName,
String[] aliases) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
contains(Charset cs)
Ascertains if a charset is a sub set of this charset
Implements the abstract method of super class.
|
static Charset |
forNameICU(String charsetName)
Returns a charset object for the named charset.
|
aliases, availableCharsets, canEncode, compareTo, compareTo, decode, defaultCharset, displayName, displayName, encode, encode, equals, forName, hashCode, isRegistered, isSupported, name, newDecoder, newEncoder, toStringpublic boolean contains(Charset cs)
public static Charset forNameICU(String charsetName) throws IllegalCharsetNameException, UnsupportedCharsetException
charsetName - The name of the requested charset,
may be either a canonical name or an aliasIllegalCharsetNameException - If the given charset name
is illegalUnsupportedCharsetException - If no support for the
named charset is available in this instance of th Java
virtual machineCopyright (c) 2007 IBM Corporation and others.