Package com.adobe.agl.charset
Class CharsetICU
java.lang.Object
java.nio.charset.Charset
com.adobe.agl.charset.CharsetICU
- All Implemented Interfaces:
Comparable<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.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
Deprecated.This API is ICU internal only.static final int
Parameter that select the set of roundtrippable Unicode code points. -
Method Summary
Modifier and TypeMethodDescriptionboolean
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.Methods inherited from class java.nio.charset.Charset
aliases, availableCharsets, canEncode, compareTo, decode, defaultCharset, displayName, displayName, encode, encode, equals, forName, forName, hashCode, isRegistered, isSupported, name, newDecoder, newEncoder, toString
-
Field Details
-
ROUNDTRIP_SET
public static final int ROUNDTRIP_SETParameter that select the set of roundtrippable Unicode code points.- See Also:
-
ROUNDTRIP_AND_FALLBACK_SET
public static final int ROUNDTRIP_AND_FALLBACK_SETDeprecated.This API is ICU internal only.Select the set of Unicode code points with roundtrip or fallback mappings. Not supported at this point.- See Also:
-
-
Method Details
-
contains
Ascertains if a charset is a sub set of this charset Implements the abstract method of super class. -
forNameICU
public static Charset forNameICU(String charsetName) throws IllegalCharsetNameException, UnsupportedCharsetException 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 illegalUnsupportedCharsetException
- If no support for the named charset is available in this instance of th Java virtual machine
-