Java Reference
In-Depth Information
class of
ResourceBundle
if they are not. You must implement two meth-
ods:
protected abstract Object
handleGetObject(String key)
tHRows Miss-
ingResourceException
Returns the object associated with the given
key
. If the key is
not defined in this bundle, it returns
null
, and that causes the
ResourceBundle
to check in the parent (if any). Do not throw
MissingResourceException
unless you check the parent instead
of letting the bundle do it. All the "get" methods are written
in terms of this one method.
public abstract Enumeration
getKeys()
Returns an
Enumeration
of the keys understood by this bundle,
including all those of the parent.
Exercise 24.1
: Get
GlobalHello
to work with the example locales. Add
some more locales, using
ListResourceBundle
,
.properties
files, and your
own specific subclass of
ResourceBundle
.