public abstract class PResourceFactory extends ResourceBundle
PResourceFactory
is a java.util.ResourceBundle
derivitive that finds and gets resources from a JAR file over the Internet.
In previous releases, this function was performed separately because
bundles in remote JAR files could not be found. Its continued use
allows chaining of resource bundles as needed, not just for a locale.ResourceBundle.Control
parent
Constructor and Description |
---|
PResourceFactory() |
Modifier and Type | Method and Description |
---|---|
static ResourceBundle |
getResBundle(ResourceBundle parent,
String res)
Static factory method to get a resource bundle for the default locale
chained to a current bundle.
|
static ResourceBundle |
getResBundle(ResourceBundle parent,
String res,
Locale loc)
Static factory method to get a resource bundle for a locale
chained to a current bundle.
|
static ResourceBundle |
getResBundle(String res)
Static factory method to get a resource bundle for the default locale.
|
static ResourceBundle |
getResBundle(String res,
Locale loc)
Static factory method to get a resource bundle for a specific locale.
|
static void |
setCodebase(URL codebase)
Sets the base URL for this VM instance.
|
clearCache, clearCache, containsKey, getBaseBundleName, getBundle, getBundle, getBundle, getBundle, getBundle, getBundle, getKeys, getLocale, getObject, getString, getStringArray, handleGetObject, handleKeySet, keySet, setParent
public static void setCodebase(URL codebase)
codebase
- the URL for the new code basepublic static ResourceBundle getResBundle(String res) throws MissingResourceException
res
- the resource bundle nameMissingResourceException
- thrown if a resource isn't foundpublic static ResourceBundle getResBundle(String res, Locale loc) throws MissingResourceException
res
- the resource bundle nameloc
- the locale to get a bundle forMissingResourceException
- thrown if a resource isn't foundpublic static ResourceBundle getResBundle(ResourceBundle parent, String res) throws MissingResourceException
parent
- the parent bundle to chain tores
- the resource bundle nameMissingResourceException
- thrown if a resource isn't foundpublic static ResourceBundle getResBundle(ResourceBundle parent, String res, Locale loc) throws MissingResourceException
parent
- the parent bundle to chain tores
- the resource bundle nameloc
- the locale to get a bundle forMissingResourceException
- thrown if the resource can't be foundCopyright © 2003, 2023, Oracle and/or its affiliates.