Package netscape.ldap
Class LDAPResourceBundle
java.lang.Object
netscape.ldap.LDAPResourceBundle
- All Implemented Interfaces:
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:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) static PropertyResourceBundle
Return the property resource bundle according to the base name of the property file and the locale.(package private) static PropertyResourceBundle
Return the property resource bundle according to the base name of the property file and the locale.private static InputStream
Constructs the whole absolute path name of a property file and retrieves an input stream on the file.private static void
printDebug
(String str) Prints debug messages if the debug mode is on.
-
Field Details
-
serialVersionUID
static final long serialVersionUID- See Also:
-
m_debug
private static final boolean m_debug- See Also:
-
m_suffix
- See Also:
-
m_locale_separator
- See Also:
-
-
Constructor Details
-
LDAPResourceBundle
LDAPResourceBundle()
-
-
Method Details
-
getBundle
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:
IOException
- Gets thrown when failed to open the resource bundle file.
-
getBundle
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:
IOException
- Gets thrown when failed to create a property resource
-
getStream
Constructs the whole absolute path name of a property file and retrieves an input stream on the file.- Parameters:
baseName
- the base name of the property file. The base name contains no locale context and no . suffix.the
- locale string to insert into the file name- Returns:
- the input stream of the property file.
-
printDebug
Prints debug messages if the debug mode is on.- Parameters:
str
- the message that is printed
-