netscape.ldap
Class LDAPResourceBundle
java.lang.Object
netscape.ldap.LDAPResourceBundle
- All Implemented Interfaces:
- java.io.Serializable
class LDAPResourceBundle
- extends java.lang.Object
- implements java.io.Serializable
This class represents a locale-specific resource for a property file.
It retrieves the property file for the given base name including the
absolute path name and locale. The property file has to be located in the
CLASSPATH and the property file's suffix is .props.
If the specified locale is en and us and the base name of the file is
netscape/ldap/errors/ErrorCodes, then the class loader will search for
the file in the following order:
ErrorCodes_en_us.props
ErrorCodes_en.props
ErrorCodes.props
- See Also:
Locale
Method Summary |
(package private) static java.util.PropertyResourceBundle |
getBundle(java.lang.String baseName)
Return the property resource bundle according to the base name of the
property file and the locale. |
(package private) static java.util.PropertyResourceBundle |
getBundle(java.lang.String baseName,
java.util.Locale l)
Return the property resource bundle according to the base name of the
property file and the locale. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
serialVersionUID
static final long serialVersionUID
- See Also:
- Constant Field Values
LDAPResourceBundle
LDAPResourceBundle()
getBundle
static java.util.PropertyResourceBundle getBundle(java.lang.String baseName)
throws java.io.IOException
- Return the property resource bundle according to the base name of the
property file and the locale. The class loader will find the closest match
with the given locale.
- Returns:
- the property resource bundle.
- Throws:
java.io.IOException
- Gets thrown when failed to open the resource
bundle file.
getBundle
static java.util.PropertyResourceBundle getBundle(java.lang.String baseName,
java.util.Locale l)
throws java.io.IOException
- Return the property resource bundle according to the base name of the
property file and the locale. The class loader will find the closest match
with the given locale.
- Parameters:
baseName
- the base name of the property file. The base name contains
no locale context and no . suffix.l
- the locale
- Returns:
- the property resource bundle.
- Throws:
java.io.IOException
- Gets thrown when failed to create a property
resource