| 
 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--com.iplanet.am.util.Locale
This class Locale.java is a utility that provides 
 functionality for applications and services to internationalize
 their messages.
| Constructor Summary | |
| Locale() | |
| Method Summary | |
| static java.lang.String | convertDateString(java.lang.String srcDateString,
                  java.util.Locale srcLocale,
                  java.util.Locale dstLocale)Converts date string from source locale to destination locale | 
| static java.lang.String | formatMessage(java.lang.String formatStr,
              java.lang.Object obj1)Formats messages using MessageFormatClass. | 
| static java.lang.String | formatMessage(java.lang.String formatStr,
              java.lang.Object[] objs)Formats to format messages using MessageFormatClass. | 
| static java.lang.String | getDateString(java.util.Date date,
              java.util.Locale locale)Gets date string from date with specified locale. | 
| static java.util.Locale | getDefaultLocale()Gets the default locale | 
| static java.util.ResourceBundle | getInstallResourceBundle(java.lang.String bundle)Gets the default install resource bundle for the default locale | 
| static java.util.Locale | getLocale(java.lang.String stringformat)Gets the locale object for the specified localized string format. | 
| static java.util.Locale | getLocaleObjFromAcceptLangHeader(java.lang.String langStr)Gets locale from accept-language header HTTP accept language header can have more than one language in the header, we honor the first language as locale | 
| static java.lang.String | getLocaleStringFromAcceptLangHeader(java.lang.String langstr)Returns locale from accept-language header HTTP accept language header can have more than one language in the header, we honor the first language as locale | 
| static java.lang.String | getNormalizedDateString(java.util.Date date)Converts the Date object into ISO-8601formatyyyy/MM/dd HH:mmlike2002/12/23 20:40. | 
| static java.util.ResourceBundle | getResourceBundle(java.lang.String bundle,
                  java.lang.String stringformat)Gets the resource bundle corresponding to the specified locale and the localized property file name. | 
| static java.lang.String | getString(java.util.ResourceBundle rb,
          java.lang.String resource)Gets the localized string for the specified key. | 
| static java.lang.String | getString(java.util.ResourceBundle rb,
          java.lang.String resource,
          Debug debug)Gets the localized string for the specified key | 
| static java.lang.String | getString(java.util.ResourceBundle rb,
          java.lang.String resource,
          Debug debug,
          java.util.ResourceBundle defaultRb)Gets the localized string for the specified key from the specified Resource or from the specified default resource | 
| static java.lang.String | getString(java.util.ResourceBundle rb,
          java.lang.String resource,
          java.lang.Object[] params)Gets the localized string for the specified key formatted as per passed parameters. | 
| static java.lang.String | getString(java.util.ResourceBundle rb,
          java.lang.String resource,
          java.util.ResourceBundle defaultRb)Gets the localized string for the specified key from the specified Resource or from the specified default resource. | 
| static java.lang.String | getString(java.util.ResourceBundle rb,
          java.lang.String resource,
          java.util.ResourceBundle defaultRb,
          java.lang.Object[] params)Gets the localized string for the specified key from the specified Resource or from the specified default resource formatted as per provided parameters. | 
| static void | main(java.lang.String[] args) | 
| static java.util.Date | parseDateString(java.lang.String dateString,
                java.util.Locale locale)Gets Date object from date string with specified locale. | 
| static java.util.Date | parseDateString(java.lang.String dateString,
                java.util.Locale locale,
                java.lang.String dateSyntax)Gets Date object from date string with specified locale. | 
| static java.util.Date | parseNormalizedDateString(java.lang.String dateString)Returns the Date object from the date string in ISO-8601format. | 
| static java.lang.String | URLDecodeField(java.lang.String strIn,
               Debug debug) | 
| static java.lang.String | URLDecodeField(java.lang.String strIn,
               java.lang.String charset,
               Debug debug) | 
| static java.lang.String | URLEncodeField(java.lang.String input,
               java.lang.String enc)This method is replacement function for URLEncoderFunction
 URL encoder function converts input string intoURLEncodedbyte stream after converting Unicode string into bytes using native 
 encoding. | 
| static java.lang.String | URLEncodeField(java.lang.String input,
               java.lang.String enc,
               Debug debug)This method is replacement function for URLEncoder | 
| Methods inherited from class java.lang.Object | 
| equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Constructor Detail | 
public Locale()
| Method Detail | 
public static void main(java.lang.String[] args)
public static java.util.Locale getLocale(java.lang.String stringformat)
stringformat - String representation of the locale. Examples:
        en_US, en_UK, ja_JP.java.util.locale object.public static java.lang.String getLocaleStringFromAcceptLangHeader(java.lang.String langstr)
langstr - Value from Accept-Language header of HTTPen_US, frpublic static java.util.Locale getLocaleObjFromAcceptLangHeader(java.lang.String langStr)
langStr - Value from Accept-Language header of HTTPen_US, fr.
public static java.util.ResourceBundle getResourceBundle(java.lang.String bundle,
                                                         java.lang.String stringformat)
bundle - Localized property file name.stringformat - String representation of the locale.java.util.ResourceBundle object.public static java.util.ResourceBundle getInstallResourceBundle(java.lang.String bundle)
bundle - Localized property file namepublic static java.util.Locale getDefaultLocale()
public static java.lang.String formatMessage(java.lang.String formatStr,
                                             java.lang.Object obj1)
MessageFormat Class.formatStr - string format template.obj1 - object to be added to the template.
public static java.lang.String formatMessage(java.lang.String formatStr,
                                             java.lang.Object[] objs)
MessageFormat Class.
 given params to format them withformatStr - string format template.objs - objects to be added to the template.public static java.util.Date parseNormalizedDateString(java.lang.String dateString)
ISO-8601
 format.
 Access Manager stores date in ISO-8601 format
 yyyy/MM/yy hh:mmdateString - in the format 2002/12/31 23:59.
public static java.util.Date parseDateString(java.lang.String dateString,
                                             java.util.Locale locale,
                                             java.lang.String dateSyntax)
dateString - date stringlocale - Locale objectdateSyntax - syntax of the date string.dateString matches the	
		 dateSyntax.
         If the syntax or date string is empty, or the string does
         not match the syntax, null will be returned.
public static java.util.Date parseDateString(java.lang.String dateString,
                                             java.util.Locale locale)
dateString - date stringlocale - Locale objectpublic static java.lang.String getNormalizedDateString(java.util.Date date)
ISO-8601 format
 yyyy/MM/dd HH:mm like 2002/12/23 20:40.date - to be normalized.ISO8601 format
         2002/12/31 11:59.
public static java.lang.String getDateString(java.util.Date date,
                                             java.util.Locale locale)
date - Date objectlocale - Locale object
public static java.lang.String convertDateString(java.lang.String srcDateString,
                                                 java.util.Locale srcLocale,
                                                 java.util.Locale dstLocale)
srcDateString - source date stringsrcLocale - source Locale objectdstLocale - destination Locale object
public static java.lang.String getString(java.util.ResourceBundle rb,
                                         java.lang.String resource,
                                         java.lang.Object[] params)
rb - resource bundle.resource - the specified key.params - formatting done as per these parameters.
public static java.lang.String getString(java.util.ResourceBundle rb,
                                         java.lang.String resource,
                                         java.util.ResourceBundle defaultRb,
                                         java.lang.Object[] params)
rb - resource bundle.resource - the specified key.defaultRb - Default resource bundle.params - formatting done as per these parameters.
public static java.lang.String getString(java.util.ResourceBundle rb,
                                         java.lang.String resource,
                                         Debug debug)
rb - resource bundle.resource - the specified key.debug - the debug instance to which the debug messages need to 
 be printed.
public static java.lang.String getString(java.util.ResourceBundle rb,
                                         java.lang.String resource,
                                         Debug debug,
                                         java.util.ResourceBundle defaultRb)
rb - resource bundle.resource - the specified key.debug - the debug instance to which the debug messages need to 
 be printed.defaultRb - Default resource bundle.
public static java.lang.String getString(java.util.ResourceBundle rb,
                                         java.lang.String resource)
rb - resource bundle.resource - the specified key.
public static java.lang.String getString(java.util.ResourceBundle rb,
                                         java.lang.String resource,
                                         java.util.ResourceBundle defaultRb)
rb - resource bundle.resource - the specified key.defaultRb - Default resource bundle.
public static java.lang.String URLEncodeField(java.lang.String input,
                                              java.lang.String enc)
                                       throws java.io.UnsupportedEncodingException
URLEncoder Function
 URL encoder function converts input string into URLEncoded
 byte stream after converting Unicode string into bytes using native 
 encoding. The URLEncoder does not work for Sun Java System
 Access Manager if default encoding is not UTF-8, hence this
 method was written.input - the input string.enc - the encoding format.java.io.UnsupportedEncodingException -  
public static java.lang.String URLEncodeField(java.lang.String input,
                                              java.lang.String enc,
                                              Debug debug)
URLEncoder Function
 URL encoder function converts input string into URLencoded
 byte stream after converting Unicode string into bytes using native
 encoding. The URLEncoder does not work for Sun Java System
 Access Manager if default encoding is not UTF-8, hence this
 method was written.- 
- Parameters:
- input- the input string
- enc- the encoding format
- debug- the debug instance to which debug messages need to
 be printed
- Returns:
- the encoded string
 
public static java.lang.String URLDecodeField(java.lang.String strIn,
                                              Debug debug)
public static java.lang.String URLDecodeField(java.lang.String strIn,
                                              java.lang.String charset,
                                              Debug debug)
| 
 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||