public abstract class ResourceBundleUtils extends Object
Some methods to work with a ResourceBundle.
| Modifier and Type | Method and Description |
|---|---|
static String |
getLocalizedMessage(String baseName,
Locale locale,
ClassLoader classLoader,
String messageCode,
Object[] messageArgs,
String defaultMessage)
Gets a string for the given key from this resource bundle or one of its
parents.
|
static String |
getLocalizedMessage(String baseName,
Locale locale,
String messageCode,
Object[] messageArgs,
String defaultMessage)
Gets a string for the given key from this resource bundle or one of its
parents.
|
static ResourceBundle |
getResourceBundle(String baseName,
Locale locale)
Return the resource bundle with the specified base name and locale.
|
static ResourceBundle |
getResourceBundle(String baseName,
Locale locale,
ClassLoader classLoader)
Return the resource bundle with the specified base name and locale.
|
public static ResourceBundle getResourceBundle(String baseName, Locale locale)
baseName - the base name of the resource bundle, a fully qualified class
namelocale - the locale for which a resource bundle is desiredResourceBundle.getBundle(String, Locale)public static ResourceBundle getResourceBundle(String baseName, Locale locale, ClassLoader classLoader)
baseName - the base name of the resource bundle, a fully qualified class
namelocale - the locale for which a resource bundle is desiredclassLoader - the class loader from which to load the resource bundleResourceBundle.getBundle(String, Locale)public static String getLocalizedMessage(String baseName, Locale locale, String messageCode, Object[] messageArgs, String defaultMessage)
{0}, they will
be replaced with the specified argument.baseName - the base name of the resource bundle, a fully qualified class
namelocale - the locale for which a resource bundle is desiredmessageCode - the key for the desired stringmessageArgs - some arguments, may be nulldefaultMessage - a default messagepublic static String getLocalizedMessage(String baseName, Locale locale, ClassLoader classLoader, String messageCode, Object[] messageArgs, String defaultMessage)
{0}, they will
be replaced with the specified argument.baseName - the base name of the resource bundle, a fully qualified class
namelocale - the locale for which a resource bundle is desiredclassLoader - the class loader from which to load the resource bundlemessageCode - the key for the desired stringmessageArgs - some arguments, may be nulldefaultMessage - a default messageCopyright © 2017 bremersee.org. All rights reserved.