Package com.ibm.wsspi.http
Interface EncodingUtils
public interface EncodingUtils
EncodingUtils provides various methods for manipulating and retrieving
 information related to charsets, locales, and other encoding data.
- 
Method SummaryModifier and TypeMethodDescriptionBasically returns everything after ";charset=".Query the default encoding.getEncodingFromLocale(Locale locale) Get the encoding for a passed in locale.getJvmConverter(String encoding) Get the JVM Converter for the specified encoding.getLocales(String acceptLangHdr) Returns a list of locales from the passed in Accept-Language header.booleanisCharsetSupported(String charset) Tests whether the specified charset is supported on the server.stripQuotes(String value) Utility method to trim off any leading or trailing quotes (single or double).
- 
Method Details- 
getDefaultEncodingString getDefaultEncoding()Query the default encoding.- Returns:
- String
 
- 
getCharsetFromContentTypeBasically returns everything after ";charset=". If no charset specified, return null.- Parameters:
- type- to extract the charset from.
- Returns:
- The charset encoding.
 
- 
getLocalesReturns a list of locales from the passed in Accept-Language header.- Parameters:
- acceptLangHdr-
- Returns:
- List
 
- 
getEncodingFromLocaleGet the encoding for a passed in locale.- Parameters:
- locale-
- Returns:
- The encoding.
 
- 
getJvmConverterGet the JVM Converter for the specified encoding.- Parameters:
- encoding-
- Returns:
- The converter if it exists, otherwise return the encoding.
 
- 
isCharsetSupportedTests whether the specified charset is supported on the server.- Parameters:
- charset- we want to test
- Returns:
- boolean indicating if supported
 
- 
stripQuotesUtility method to trim off any leading or trailing quotes (single or double).- Parameters:
- value-
- Returns:
- String (null if null input provided)
 
 
-