Contents | Package | Class | Tree | Deprecated | Index | Help | XML for Java
PREV | NEXT | SHOW LISTS | HIDE LISTS |

# Class com.ibm.xml.parser.MIME2Java

    java.lang.Object
        |
        +----com.ibm.xml.parser.MIME2Java

public class MIME2Java
extends java.lang.Object

MIME2Java is a convenience class which handles conversions between MIME charset names and Java encoding names.

The supported XML encodings are the intersection of XML-supported code sets and those supported in JDK 1.1.

MIME charset names are used on xmlEncoding parameters to methods such as `TXDocument#setEncoding` and `DTD#setEncoding`.

Java encoding names are used on enc or encoding parameters to methods such as `TXDocument#printWithFormat` and `DTD#printExternal`.

Version:
  1.1
See Also:
  setEncoding, setEncoding, printWithFormat, printExternal

Method Summary
static java.lang.String | convert(java.lang.String mimeCharsetName) Convert a MIME charset name, also known as an XML encoding name, to a Java encoding name.
static java.lang.String | reverse(java.lang.String enc) Convert a Java encoding name to MIME charset name.

Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Method Detail

### convert

    public static java.lang.String convert(java.lang.String mimeCharsetName)

  Convert a MIME charset name, also known as an XML encoding name, to a Java encoding name.
  Parameters:
    `mimeCharsetName` - Case insensitive MIME charset name: `UTF-8, US-ASCII, ISO-8859-1, ISO-8859-2, ISO-8859-3, ISO-8859-4, ISO-8859-5, ISO-8859-6, ISO-8859-7, ISO-8859-8, ISO-8859-9, ISO-2022-JP, Shift_JIS, EUC-JP, GB2312, and Big5`.
  Returns:
    Java encoding name, or null if mimeCharsetName is unknown.
  See Also:
    reverse

### reverse

    public static java.lang.String reverse(java.lang.String enc)

  Convert a Java encoding name to MIME charset name. Available values of enc are "UTF8", "8859_1", "8859_2", "8859_3", "8859_4", "8859_5", "8859_6", "8859_7", "8859_8", "8859_9", "JIS", "SJIS", "EUCJIS", "GB2312" and "BIG5".
  Parameters:
    `enc` - Case insensitive Java encoding name: `UTF8, 8859_1, 8859_2, 8859_3, 8859_4, 8859_5, 8859_6, 8859_7, 8859_8, 8859_9, JIS, SJIS, EUCJIS, GB2312, and BIG5`.
  Returns:
    MIME charset name, or null if enc is unknown.
  See Also:
    convert

Contents | Package | Class | Tree | Deprecated | Index | Help |
PREV | NEXT | SHOW LISTS | HIDE LISTS |