electric.util.encoding
Class StringEncodings

java.lang.Object
  extended byelectric.util.encoding.StringEncodings
All Implemented Interfaces:
ILoggingConstants

public class StringEncodings
extends java.lang.Object
implements ILoggingConstants

StringEncodings encapsulates two pieces of information. The first piece of information is what encoding to use for Protocol specific bits. For East Asian browsers, this should probably be set to Shift_JIS, but by default, it's UTF-8. The other piece of information is the areas where a protocol simply specified that something must be handled as bytes (Such as Basic Authentication in HTTP.), yet externally, we need this to be a string. This could be EBCDIC for an S/390 or it could be Shift_JIS for East Asian. (The union of the two is ambiguous, since I don't know what the current usage is).

Author:
webMethods

Field Summary
 
Fields inherited from interface electric.util.log.ILoggingConstants
CLASSLOADER_EVENT, COMMAND_EVENT, COMMENT_EVENT, CONFIG_EVENT, DEBUG_EVENT, ELECTRIC_LOGGING_PROPERTY, ERROR_EVENT, EXCEPTION_EVENT, FILE_EVENT, LICENSE_EVENT, RESOURCES_EVENT, SECURITY_EVENT, SHUTDOWN_EVENT, SOURCE_EVENT, SQL_EVENT, STARTUP_EVENT, WARNING_EVENT
 
Constructor Summary
StringEncodings()
           
 
Method Summary
static java.lang.String fromAssumedEncoding(byte[] bytes)
           
static java.lang.String fromAssumedEncoding(byte[] bytes, int offset, int length)
           
static java.lang.String fromProtocolEncoding(byte[] bytes)
           
static java.lang.String fromProtocolEncoding(byte[] bytes, int offset, int length)
           
static java.lang.String getAssumedEncoding()
           
static java.lang.String getProtocolEncoding()
           
static void setAssumedEncoding(java.lang.String assumedEncoding)
           
static void setProtocolEncoding(java.lang.String protocolEncoding)
           
static byte[] toAssumedEncoding(java.lang.String header)
           
static byte[] toProtocolEncoding(java.lang.String header)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StringEncodings

public StringEncodings()
Method Detail

getProtocolEncoding

public static java.lang.String getProtocolEncoding()

setProtocolEncoding

public static void setProtocolEncoding(java.lang.String protocolEncoding)
Parameters:
protocolEncoding -

getAssumedEncoding

public static java.lang.String getAssumedEncoding()

setAssumedEncoding

public static void setAssumedEncoding(java.lang.String assumedEncoding)
Parameters:
assumedEncoding -

fromProtocolEncoding

public static java.lang.String fromProtocolEncoding(byte[] bytes)
Parameters:
bytes -

fromProtocolEncoding

public static java.lang.String fromProtocolEncoding(byte[] bytes,
                                                    int offset,
                                                    int length)
Parameters:
bytes -
offset -
length -

toProtocolEncoding

public static byte[] toProtocolEncoding(java.lang.String header)
Parameters:
header -

fromAssumedEncoding

public static java.lang.String fromAssumedEncoding(byte[] bytes)
Parameters:
bytes -

fromAssumedEncoding

public static java.lang.String fromAssumedEncoding(byte[] bytes,
                                                   int offset,
                                                   int length)
Parameters:
bytes -
offset -
length -

toAssumedEncoding

public static byte[] toAssumedEncoding(java.lang.String header)
Parameters:
header -


copyright© 2001-2004 by webMethods All Rights Reserved.