com.ibm.wbi.util
Class EncodingConverter

java.lang.Object
  |
  +--com.ibm.wbi.util.EncodingConverter

public class EncodingConverter
extends java.lang.Object

This class provides conversions from standard MIME encoding names to Java encoding names. For example, an HTML or XML document may specify an encoding of "Shift_JIS" while the Java encoding string that must be used would be "SJIS". This class helps provide this mapping.


Constructor Summary
EncodingConverter()
           
 
Method Summary
static java.lang.String javaEncodingFromMimeEncoding(java.lang.String mimeEncoding)
          Return the Java encoding equivalent for the given MIME encoding
static void main(java.lang.String[] args)
          Returns the Java encoding for the given MIME name
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EncodingConverter

public EncodingConverter()
Method Detail

javaEncodingFromMimeEncoding

public static java.lang.String javaEncodingFromMimeEncoding(java.lang.String mimeEncoding)
Return the Java encoding equivalent for the given MIME encoding
Parameters:
mimeEncoding - the MIME encoding string (e.g. Shift_JIS)
Returns:
String the correct encoding string or empty string if none found

main

public static void main(java.lang.String[] args)
Returns the Java encoding for the given MIME name
Parameters:
args - should be 1 arg, the MIME encoding name to find the equivalent Java encoding for