|
Oracle Fusion Middleware Java API Reference for Oracle Extension SDK 11g Release 2 (11.1.2.2.0) E17493-03 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object
oracle.ide.util.Encodings
public final class Encodings
Utility class for dealing with character encodings. The determination of what encodings are available is based on the information supplied by Charset
. Mapping from an alias to a canonical (IANA) name is provided.
Field Summary | |
---|---|
static java.lang.String |
UTF8_ENCODING The name of the 'UTF-8' encoding. |
Method Summary | |
---|---|
static java.lang.String |
convertJdk2IanaEncoding(java.lang.String jdkEncoding) Converts the specified JDK encoding to an IANA encoding. |
static java.lang.String |
getDefaultEncoding() Returns the default character encoding being used by the Java implementation. |
static java.lang.String |
getDefaultIanaEncoding() Returns the default character encoding name being used by the Java implementation as a suitable IANA name. |
static java.lang.String[] |
getEncodings() Returns a string array of encodings that are supported by the Java implementation. |
static void |
initComboBox(javax.swing.JComboBox comboBox, boolean addDefaultItem, java.lang.String selectedEncoding) |
static boolean |
isDefaultCp1252() Certain optimizations can be performed when the running JDK's default character encoding is "Cp1252". |
static boolean |
isSupported(java.lang.String encoding) Returns true if the specified encoding is supported by the Java implementation. |
static void |
loadEncodings(javax.swing.JComboBox comboBox, boolean addDefaultItem, java.lang.String selectedEncoding) The specified JComboBox is populated with all of the available character encodings in the currently running JDK. |
static void |
setEncodingsFile(java.io.File encodingsFile) |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String UTF8_ENCODING
Method Detail |
---|
public static void setEncodingsFile(java.io.File encodingsFile)
public static boolean isSupported(java.lang.String encoding)
true
if the specified encoding is supported by the Java implementation. Returns false
if the encoding is not supported.public static java.lang.String getDefaultEncoding()
public static java.lang.String getDefaultIanaEncoding()
Use this method to get an encoding name for the current platform and locale that is most likely to be recognized by another XML parser.
public static java.lang.String convertJdk2IanaEncoding(java.lang.String jdkEncoding)
public static java.lang.String[] getEncodings()
public static boolean isDefaultCp1252()
public static void initComboBox(javax.swing.JComboBox comboBox, boolean addDefaultItem, java.lang.String selectedEncoding)
public static void loadEncodings(javax.swing.JComboBox comboBox, boolean addDefaultItem, java.lang.String selectedEncoding)
JComboBox
is populated with all of the available character encodings in the currently running JDK. The determination of available encodings is run on a separate thread, and then the combo box's model is changed on the Swing event thread. The very first item in the combobox is "Default", which the application should interpret to mean that no encoding is specified and therefore a default encoding should be used that is appropriate for the current locale.
The selectedEncoding
parameter is used to specify which encoding in the combobox should initially come up as selectd. This can be null, which means that the "Default" item will be selected.
|
Oracle Fusion Middleware Java API Reference for Oracle Extension SDK 11g Release 2 (11.1.2.2.0) E17493-03 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |