public final class CharsetProviderICU extends CharsetProvider
Constructor and Description |
---|
CharsetProviderICU()
Default constructor
|
Modifier and Type | Method and Description |
---|---|
Charset |
charsetForName(String charsetName)
Constructs a Charset for the given charset name.
|
Charset |
charsetForName(String charsetName,
String classPath)
Constructs a charset for the given ICU conversion table from the specified class path.
|
Charset |
charsetForName(String charsetName,
String classPath,
ClassLoader loader)
Constructs a charset for the given ICU conversion table from the specified class path.
|
Iterator<Charset> |
charsets()
Returns an iterator for the available ICU Charsets.
|
static String[] |
getAllNames()
Deprecated.
This API is ICU internal only.
|
static String[] |
getAvailableNames()
Deprecated.
This API is ICU internal only.
|
static String |
getICUCanonicalName(String enc)
Deprecated.
This API is ICU internal only.
|
static String |
getJavaCanonicalName(String charsetName)
Deprecated.
This API is ICU internal only.
|
public CharsetProviderICU()
public final Charset charsetForName(String charsetName)
charsetForName
in class CharsetProvider
charsetName
- charset namepublic final Charset charsetForName(String charsetName, String classPath)
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.charsetName
- The name of the charset conversion table.classPath
- The class path that contain the conversion table.public Charset charsetForName(String charsetName, String classPath, ClassLoader loader)
charsetForName(String, String)
.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@Deprecated public static final String getICUCanonicalName(String enc) throws UnsupportedCharsetException
enc
- converter nameUnsupportedCharsetException
@Deprecated public static String getJavaCanonicalName(String charsetName)
charsetName
- converter namepublic final Iterator<Charset> charsets()
charsets
in class CharsetProvider
@Deprecated public static final String[] getAvailableNames()
@Deprecated public static final String[] getAllNames()
Copyright © 2016 Unicode, Inc. and others.