com.ibm.icu.charset

Class CharsetICU

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 and CharsetICU. 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.

UNKNOWN: ICU 3.6 This API might change or be removed in a future release.

Constructor Summary
protected CharsetICU(String icuCanonicalName, String canonicalName, String[] aliases)
Method Summary
booleancontains(Charset cs)
Ascertains if a charset is a sub set of this charset Implements the abstract method of super class.
static CharsetforNameICU(String charsetName)
Returns a charset object for the named charset.

Constructor Detail

CharsetICU

protected CharsetICU(String icuCanonicalName, String canonicalName, String[] aliases)

Parameters: icuCanonicalName canonicalName aliases

UNKNOWN: ICU 3.6 This API might change or be removed in a future release.

Method Detail

contains

public boolean contains(Charset cs)
Ascertains if a charset is a sub set of this charset Implements the abstract method of super class.

Parameters: cs charset to test

Returns: true if the given charset is a subset of this charset

UNKNOWN: ICU 3.6

forNameICU

public static Charset forNameICU(String charsetName)
Returns a charset object for the named charset. This method gurantee that ICU charset is returned when available. If the ICU charset provider does not support the specified charset, then try other charset providers including the standard Java charset provider.

Parameters: charsetName The name of the requested charset, may be either a canonical name or an alias

Returns: A charset object for the named charset

Throws: IllegalCharsetNameException If the given charset name is illegal UnsupportedCharsetException If no support for the named charset is available in this instance of th Java virtual machine

UNKNOWN: ICU 3.6 This API might change or be removed in a future release.

Copyright (c) 2007 IBM Corporation and others.