Class CharsetProviderICU
java.lang.Object
java.nio.charset.spi.CharsetProvider
org.graalvm.shadowed.com.ibm.icu.charset.CharsetProviderICU
A concrete subclass of CharsetProvider for loading and providing charset converters
in ICU.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal CharsetcharsetForName(String charsetName) Constructs a Charset for the given charset name.final CharsetcharsetForName(String charsetName, String classPath) Constructs a charset for the given ICU conversion table from the specified class path.charsetForName(String charsetName, String classPath, ClassLoader loader) Constructs a charset for the given ICU conversion table from the specified class path.charsets()Returns an iterator for the available ICU Charsets.static final String[]Deprecated.This API is ICU internal only.static final String[]Deprecated.This API is ICU internal only.static final StringDeprecated.This API is ICU internal only.static StringgetJavaCanonicalName(String charsetName) Deprecated.This API is ICU internal only.
-
Constructor Details
-
CharsetProviderICU
public CharsetProviderICU()Default constructor
-
-
Method Details
-
charsetForName
Constructs a Charset for the given charset name. Implements the abstract method of super class.- Specified by:
charsetForNamein classCharsetProvider- Parameters:
charsetName- charset name- Returns:
- Charset object for the given charset name, null if unsupported
-
charsetForName
Constructs a charset for the given ICU conversion table from the specified class path. Example use:cnv = CharsetProviderICU.charsetForName("myConverter", "com/myCompany/myDataPackage");. In this example myConverter.cnv would exist in the com/myCompany/myDataPackage Java package. Conversion tables can be made with ICU4C's makeconv tool. This function allows you to allows you to load user defined conversion tables that are outside of ICU's core data.- Parameters:
charsetName- The name of the charset conversion table.classPath- The class path that contain the conversion table.- Returns:
- charset object for the given charset name, null if unsupported
-
charsetForName
Constructs a charset for the given ICU conversion table from the specified class path. This function is similar tocharsetForName(String, String).- Parameters:
charsetName- The name of the charset conversion table.classPath- The class path that contain the conversion table.loader- the class object from which to load the charset conversion table- Returns:
- charset object for the given charset name, null if unsupported
-
getICUCanonicalName
@Deprecated public static final String getICUCanonicalName(String enc) throws UnsupportedCharsetException Deprecated.This API is ICU internal only.Gets the canonical name of the converter as defined by Java- Parameters:
enc- converter name- Returns:
- canonical name of the converter
- Throws:
UnsupportedCharsetException
-
getJavaCanonicalName
Deprecated.This API is ICU internal only.Gets the canonical name of the converter as defined by Java- Parameters:
charsetName- converter name- Returns:
- canonical name of the converter
-
charsets
Returns an iterator for the available ICU Charsets. Implements the abstract method of super class.- Specified by:
charsetsin classCharsetProvider- Returns:
- the Charset iterator
-
getAvailableNames
Deprecated.This API is ICU internal only.Gets the canonical names of available ICU converters- Returns:
- array of available converter names
-
getAllNames
Deprecated.This API is ICU internal only.Return all names available- Returns:
- String[] an array of all available names
-