public class Utf8PropertiesResourceBundleControl extends ResourceBundle.Control
INSTANCE
as the control parameter
when calling ResourceBundle.getBundle(String, java.util.ResourceBundle.Control)
.Modifier and Type | Field and Description |
---|---|
static Utf8PropertiesResourceBundleControl |
INSTANCE
The one and only instance.
|
FORMAT_CLASS, FORMAT_DEFAULT, FORMAT_PROPERTIES, TTL_DONT_CACHE, TTL_NO_EXPIRATION_CONTROL
Modifier | Constructor and Description |
---|---|
private |
Utf8PropertiesResourceBundleControl() |
Modifier and Type | Method and Description |
---|---|
Locale |
getFallbackLocale(String baseName,
Locale locale)
We don't need a fallback locale.
|
List<String> |
getFormats(String baseName)
This control only handle property files.
|
ResourceBundle |
newBundle(String baseName,
Locale locale,
String format,
ClassLoader loader,
boolean reload)
Load property files using UTF-8.
|
getCandidateLocales, getControl, getNoFallbackControl, getTimeToLive, needsReload, toBundleName, toResourceName
public static final Utf8PropertiesResourceBundleControl INSTANCE
private Utf8PropertiesResourceBundleControl()
public Locale getFallbackLocale(String baseName, Locale locale)
getFallbackLocale
in class ResourceBundle.Control
public List<String> getFormats(String baseName)
getFormats
in class ResourceBundle.Control
ResourceBundle.Control.FORMAT_PROPERTIES
.public ResourceBundle newBundle(String baseName, Locale locale, String format, ClassLoader loader, boolean reload) throws IllegalAccessException, InstantiationException, IOException
newBundle
in class ResourceBundle.Control
IllegalAccessException
InstantiationException
IOException