atg.servlet.pagecompile
Interface Converter

All Known Implementing Classes:
GenericConverter, JapaneseConverter

public interface Converter

Converts encoded text to UNICODE. Useful when the encoding method of the text is not known. Should only be used if you are really looking for an encoding. If you know you have ASCII, then don't waste your time trying to convert.


Field Summary
static java.lang.String CLASS_VERSION
          Class version string
 
Method Summary
 java.lang.String convert(byte[] pValue, java.lang.String pEncoding)
          Converts the byte array into a Java UNICODE String using the specified encoding.
 java.util.Dictionary convert(java.util.Dictionary pValue, java.lang.String pEncoding)
          Converts all of the keys and values in the supplied dictionary to UNICODE Strings using the specified encoding.
 java.lang.String convert(java.lang.String pValue, java.lang.String pEncoding)
          Converts the byte array into a Java UNICODE String using the specified encoding.
 java.lang.String getFallbackEncoding()
          The encoding type to use when the actual encoding type of data to convert could not be discerned.
 void setFallbackEncoding(java.lang.String pValue)
          The encoding type to use when the actual encoding type of data to convert could not be discerned.
 

Field Detail

CLASS_VERSION

static final java.lang.String CLASS_VERSION
Class version string

See Also:
Constant Field Values
Method Detail

setFallbackEncoding

void setFallbackEncoding(java.lang.String pValue)
The encoding type to use when the actual encoding type of data to convert could not be discerned. This value should be a String such as, "JIS", "SJIS", or "EUC_JP".


getFallbackEncoding

java.lang.String getFallbackEncoding()
The encoding type to use when the actual encoding type of data to convert could not be discerned. This value should be a String such as, "JIS", "SJIS", or "EUC_JP".


convert

java.lang.String convert(byte[] pValue,
                         java.lang.String pEncoding)
                         throws java.io.IOException
Converts the byte array into a Java UNICODE String using the specified encoding.

Throws:
java.io.IOException

convert

java.lang.String convert(java.lang.String pValue,
                         java.lang.String pEncoding)
                         throws java.io.IOException
Converts the byte array into a Java UNICODE String using the specified encoding. This method assumes that the native text only occupies the low bytes of the String, i.e. the high bytes in the supplied String will be dropped.

Throws:
java.io.IOException

convert

java.util.Dictionary convert(java.util.Dictionary pValue,
                             java.lang.String pEncoding)
                             throws java.io.IOException
Converts all of the keys and values in the supplied dictionary to UNICODE Strings using the specified encoding. The method assumes that the keys and values are both Strings to begin with.

Throws:
java.io.IOException