Package io.microsphere.util
Class PropertyResourceBundleUtils
- java.lang.Object
-
- io.microsphere.util.BaseUtils
-
- io.microsphere.util.PropertyResourceBundleUtils
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.util.ResourceBundle
getBundle(java.lang.String baseName)
ResourceBundle.getBundle(String, Locale)
withdefault file encoding
encoding anddefault Locale
underThread context ClassLoader
static java.util.ResourceBundle
getBundle(java.lang.String baseName, java.lang.String encoding)
ResourceBundle.getBundle(String, Locale)
with specified encoding anddefault Locale
underThread context ClassLoader
static java.util.ResourceBundle
getBundle(java.lang.String baseName, java.util.Locale locale, java.lang.ClassLoader classLoader, java.lang.String encoding)
ResourceBundle.getBundle(String, Locale, ClassLoader)
with specified encodingstatic java.util.ResourceBundle
getBundle(java.lang.String baseName, java.util.Locale locale, java.lang.String encoding)
ResourceBundle.getBundle(String, Locale)
with specified encoding underThread context ClassLoader
-
-
-
Method Detail
-
getBundle
public static java.util.ResourceBundle getBundle(java.lang.String baseName)
ResourceBundle.getBundle(String, Locale)
withdefault file encoding
encoding anddefault Locale
underThread context ClassLoader
- Parameters:
baseName
- the base name of the resource bundle, a fully qualified class name- Returns:
- Throws:
java.lang.NullPointerException
- ifbaseName
,locale
, orloader
isnull
java.util.MissingResourceException
- if no resource bundle for the specified base name can be foundjava.lang.IllegalArgumentException
- if the givencontrol
doesn't perform properly (e.g.,control.getCandidateLocales
returns null.) Note that validation ofcontrol
is performed as needed.
-
getBundle
public static java.util.ResourceBundle getBundle(java.lang.String baseName, java.lang.String encoding)
ResourceBundle.getBundle(String, Locale)
with specified encoding anddefault Locale
underThread context ClassLoader
- Parameters:
baseName
- the base name of the resource bundle, a fully qualified class nameencoding
- the control which gives information for the resource bundle loading process- Returns:
- Throws:
java.lang.NullPointerException
- ifbaseName
isnull
java.util.MissingResourceException
- if no resource bundle for the specified base name can be foundjava.lang.IllegalArgumentException
- if the givencontrol
doesn't perform properly (e.g.,control.getCandidateLocales
returns null.) Note that validation ofcontrol
is performed as needed.
-
getBundle
public static java.util.ResourceBundle getBundle(java.lang.String baseName, java.util.Locale locale, java.lang.String encoding)
ResourceBundle.getBundle(String, Locale)
with specified encoding underThread context ClassLoader
- Parameters:
baseName
- the base name of the resource bundle, a fully qualified class namelocale
- the locale for which a resource bundle is desiredencoding
- the control which gives information for the resource bundle loading process- Returns:
- Throws:
java.lang.NullPointerException
- ifbaseName
,locale
isnull
java.util.MissingResourceException
- if no resource bundle for the specified base name can be foundjava.lang.IllegalArgumentException
- if the givencontrol
doesn't perform properly (e.g.,control.getCandidateLocales
returns null.) Note that validation ofcontrol
is performed as needed.
-
getBundle
public static java.util.ResourceBundle getBundle(java.lang.String baseName, java.util.Locale locale, java.lang.ClassLoader classLoader, java.lang.String encoding)
ResourceBundle.getBundle(String, Locale, ClassLoader)
with specified encoding- Parameters:
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 bundleencoding
- the control which gives information for the resource bundle loading process- Returns:
- Throws:
java.lang.NullPointerException
- ifbaseName
,locale
, orloader
isnull
java.util.MissingResourceException
- if no resource bundle for the specified base name can be foundjava.lang.IllegalArgumentException
- if the givencontrol
doesn't perform properly (e.g.,control.getCandidateLocales
returns null.) Note that validation ofcontrol
is performed as needed.
-
-