atg.servlet.pagecompile
Class GenericConverter

java.lang.Object
  extended by atg.nucleus.logging.VariableArgumentApplicationLoggingImpl
      extended by atg.nucleus.GenericService
          extended by atg.servlet.pagecompile.GenericConverter
All Implemented Interfaces:
atg.naming.AbsoluteNameable, NameContextBindingListener, NameContextElement, atg.naming.NameContextParentable, NameResolver, AdminableService, atg.nucleus.Configured, ApplicationLogging, atg.nucleus.logging.ApplicationLoggingSender, atg.nucleus.logging.TraceApplicationLogging, VariableArgumentApplicationLogging, ComponentNameResolver, Service, ServiceListener, Converter, java.util.EventListener

public class GenericConverter
extends GenericService
implements Converter

Converts raw text data into UNICODE strings.


Field Summary
static java.lang.String CLASS_VERSION
          Class version string
 
Fields inherited from class atg.nucleus.GenericService
SERVICE_INFO_KEY
 
Fields inherited from interface atg.nucleus.logging.TraceApplicationLogging
DEFAULT_LOG_TRACE_STATUS
 
Fields inherited from interface atg.nucleus.logging.ApplicationLogging
DEFAULT_LOG_DEBUG_STATUS, DEFAULT_LOG_ERROR_STATUS, DEFAULT_LOG_INFO_STATUS, DEFAULT_LOG_WARNING_STATUS
 
Constructor Summary
GenericConverter()
          Empty constructor.
 
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.
 
Methods inherited from class atg.nucleus.GenericService
addLogListener, createAdminServlet, doStartService, doStopService, getAbsoluteName, getAdminServlet, getAdminServletOutputStreamEncoding, getLoggingForVlogging, getLogListenerCount, getLogListeners, getName, getNameContext, getNucleus, getRoot, getServiceConfiguration, getServiceInfo, isAdminServletUseServletOutputStream, isLoggingDebug, isLoggingError, isLoggingInfo, isLoggingTrace, isLoggingWarning, isRunning, logDebug, logDebug, logDebug, logError, logError, logError, logInfo, logInfo, logInfo, logTrace, logTrace, logTrace, logWarning, logWarning, logWarning, nameContextElementBound, nameContextElementUnbound, removeLogListener, reResolveThis, resolveName, resolveName, resolveName, resolveName, sendLogEvent, setAdminServletOutputStreamEncoding, setAdminServletUseServletOutputStream, setLoggingDebug, setLoggingError, setLoggingInfo, setLoggingTrace, setLoggingWarning, setNucleus, setServiceInfo, startService, stopService
 
Methods inherited from class atg.nucleus.logging.VariableArgumentApplicationLoggingImpl
vlogDebug, vlogDebug, vlogDebug, vlogDebug, vlogDebugTrace, vlogError, vlogError, vlogError, vlogError, vlogInfo, vlogInfo, vlogInfo, vlogInfo, vlogTrace, vlogTrace, vlogTrace, vlogTrace, vlogWarning, vlogWarning, vlogWarning, vlogWarning
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CLASS_VERSION

public static java.lang.String CLASS_VERSION
Class version string

Constructor Detail

GenericConverter

public GenericConverter()
Empty constructor.

Method Detail

setFallbackEncoding

public 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".

Specified by:
setFallbackEncoding in interface Converter

getFallbackEncoding

public 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".

Specified by:
getFallbackEncoding in interface Converter

convert

public 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.

Specified by:
convert in interface Converter
Throws:
java.io.IOException

convert

public 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.

Specified by:
convert in interface Converter
Throws:
java.io.IOException

convert

public 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.

Specified by:
convert in interface Converter
Throws:
java.io.IOException