|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.nio.charset.Charset
com.ibm.icu.charset.CharsetICU
public abstract class CharsetICU
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.
Field Summary | |
---|---|
static int |
ROUNDTRIP_AND_FALLBACK_SET
Deprecated. This API is ICU internal only. |
static int |
ROUNDTRIP_SET
Parameter that select the set of roundtrippable Unicode code points. |
Constructor Summary | |
---|---|
protected |
CharsetICU(String icuCanonicalName,
String canonicalName,
String[] aliases)
|
Method Summary | |
---|---|
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. |
void |
getUnicodeSet(UnicodeSet setFillIn,
int which)
Returns the set of Unicode code points that can be converted by an ICU Converter. |
Methods inherited from class java.nio.charset.Charset |
---|
aliases, availableCharsets, canEncode, compareTo, compareTo, decode, defaultCharset, displayName, displayName, encode, encode, equals, forName, hashCode, isRegistered, isSupported, name, newDecoder, newEncoder, toString |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final int ROUNDTRIP_SET
public static final int ROUNDTRIP_AND_FALLBACK_SET
Constructor Detail |
---|
protected CharsetICU(String icuCanonicalName, String canonicalName, String[] aliases)
icuCanonicalName
- canonicalName
- aliases
- Method Detail |
---|
public boolean contains(Charset cs)
contains
in class Charset
cs
- charset to test
public static Charset forNameICU(String charsetName) throws IllegalCharsetNameException, UnsupportedCharsetException
charsetName
- The name of the requested charset,
may be either a canonical name or an alias
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 machinepublic void getUnicodeSet(UnicodeSet setFillIn, int which)
Returns the set of Unicode code points that can be converted by an ICU Converter.
The current implementation returns only one kind of set (UCNV_ROUNDTRIP_SET): The set of all Unicode code points that can be roundtrip-converted (converted without any data loss) with the converter This set will not include code points that have fallback mappings or are only the result of reverse fallback mappings. See UTR #22 "Character Mapping Markup Language" at http://www.unicode.org/reports/tr22/
* In the future, there may be more UConverterUnicodeSet choices to select sets with different properties.
This is useful for example for
setFillIn
- A valid UnicodeSet. It will be cleared by this function before
the converter's specific set is filled in.which
- A selector; currently ROUNDTRIP_SET is the only supported value.
IllegalArgumentException
- if the parameters does not match.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |