1 *java.util.ResourceBundle* *ResourceBundle* Resource bundles contain locale-spec
3 public abstract class ResourceBundle
4 extends |java.lang.Object|
6 |java.util.ResourceBundle_Description|
7 |java.util.ResourceBundle_Fields|
8 |java.util.ResourceBundle_Constructors|
9 |java.util.ResourceBundle_Methods|
11 ================================================================================
13 *java.util.ResourceBundle_Fields*
14 |java.util.ResourceBundle_java.util.ResourceBundle.parent|
16 *java.util.ResourceBundle_Constructors*
17 |java.util.ResourceBundle()|Sole constructor.
19 *java.util.ResourceBundle_Methods*
20 |java.util.ResourceBundle.clearCache()|Removes all resource bundles from the ca
21 |java.util.ResourceBundle.clearCache(ClassLoader)|Removes all resource bundles
22 |java.util.ResourceBundle.containsKey(String)|Determines whether the given key
23 |java.util.ResourceBundle.getBundle(String)|Gets a resource bundle using the sp
24 |java.util.ResourceBundle.getBundle(String,Locale)|Gets a resource bundle using
25 |java.util.ResourceBundle.getBundle(String,Locale,ClassLoader)|Gets a resource
26 |java.util.ResourceBundle.getBundle(String,Locale,ClassLoader,ResourceBundle.Control)|
27 |java.util.ResourceBundle.getBundle(String,Locale,ResourceBundle.Control)|Retur
28 |java.util.ResourceBundle.getBundle(String,ResourceBundle.Control)|Returns a re
29 |java.util.ResourceBundle.getKeys()|Returns an enumeration of the keys.
30 |java.util.ResourceBundle.getLocale()|Returns the locale of this resource bundl
31 |java.util.ResourceBundle.getObject(String)|Gets an object for the given key fr
32 |java.util.ResourceBundle.getString(String)|Gets a string for the given key fro
33 |java.util.ResourceBundle.getStringArray(String)|Gets a string array for the gi
34 |java.util.ResourceBundle.handleGetObject(String)|Gets an object for the given
35 |java.util.ResourceBundle.handleKeySet()|Returns a Set of the keys contained on
36 |java.util.ResourceBundle.keySet()|Returns a Set of all keys contained in this
37 |java.util.ResourceBundle.setParent(ResourceBundle)|Sets the parent bundle of t
39 *java.util.ResourceBundle_Description*
41 Resource bundles contain locale-specific objects. When your program needs a
42 locale-specific resource, a String for example, your program can load it from
43 the resource bundle that is appropriate for the current user's locale. In this
44 way, you can write program code that is largely independent of the user's
45 locale isolating most, if not all, of the locale-specific information in
48 This allows you to write programs that can:
50 be easily localized, or translated, into different languages handle multiple
51 locales at once be easily modified later to support even more locales
53 Resource bundles belong to families whose members share a common base name, but
54 whose names also have additional components that identify their locales. For
55 example, the base name of a family of resource bundles might be "MyResources".
56 The family should have a default resource bundle which simply has the same name
57 as its family - "MyResources" - and will be used as the bundle of last resort
58 if a specific locale is not supported. The family can then provide as many
59 locale-specific members as needed, for example a German one named
62 Each resource bundle in a family contains the same items, but the items have
63 been translated for the locale represented by that resource bundle. For
64 example, both "MyResources" and "MyResources_de" may have a String that's used
65 on a button for canceling operations. In "MyResources" the String may contain
66 "Cancel" and in "MyResources_de" it may contain "Abbrechen".
68 If there are different resources for different countries, you can make
69 specializations: for example, "MyResources_de_CH" contains objects for the
70 German language (de) in Switzerland (CH). If you want to only modify some of
71 the resources in the specialization, you can do so.
73 When your program needs a locale-specific object, it loads the ResourceBundle
74 class using the getBundle(|java.util.ResourceBundle|) method:
78 ResourceBundle myResources = ResourceBundle.getBundle("MyResources",
83 Resource bundles contain key/value pairs. The keys uniquely identify a
84 locale-specific object in the bundle. Here's an example of a ListResourceBundle
85 that contains two key/value pairs:
89 public class MyResources extends ListResourceBundle { protected Object[][]
90 getContents() { return new Object[][] { // LOCALIZE THE SECOND STRING OF EACH
91 ARRAY (e.g., "OK") {"OkKey", "OK"}, {"CancelKey", "Cancel"}, // END OF MATERIAL
94 Keys are always Strings. In this example, the keys are "OkKey" and "CancelKey".
95 In the above example, the values are also Strings--"OK" and "Cancel"--but they
96 don't have to be. The values can be any type of object.
98 You retrieve an object from resource bundle using the appropriate getter
99 method. Because "OkKey" and "CancelKey" are both strings, you would use
100 getString to retrieve them:
104 button1 = new Button(myResources.getString("OkKey")); button2 = new
105 Button(myResources.getString("CancelKey"));
107 The getter methods all require the key as an argument and return the object if
108 found. If the object is not found, the getter method throws a
109 MissingResourceException.
111 Besides getString, ResourceBundle also provides a method for getting string
112 arrays, getStringArray, as well as a generic getObject method for any other
113 type of object. When using getObject, you'll have to cast the result to the
114 appropriate type. For example:
118 int[] myIntegers = (int[]) myResources.getObject("intList");
122 The Java Platform provides two subclasses of ResourceBundle, ListResourceBundle
123 and PropertyResourceBundle, that provide a fairly simple way to create
124 resources. As you saw briefly in a previous example, ListResourceBundle manages
125 its resource as a list of key/value pairs. PropertyResourceBundle uses a
126 properties file to manage its resources.
128 If ListResourceBundle or PropertyResourceBundle do not suit your needs, you can
129 write your own ResourceBundle subclass. Your subclasses must override two
130 methods: handleGetObject and getKeys().
132 ResourceBundle.Control
134 The (|java.util.ResourceBundle.Control|) class provides information necessary
135 to perform the bundle loading process by the getBundle factory methods that
136 take a ResourceBundle.Control instance. You can implement your own subclass in
137 order to enable non-standard resource bundle formats, change the search
138 strategy, or define caching parameters. Refer to the descriptions of the class
139 and the getBundle(|java.util.ResourceBundle|) factory method for details.
143 Resource bundle instances created by the getBundle factory methods are cached
144 by default, and the factory methods return the same resource bundle instance
145 multiple times if it has been cached. getBundle clients may clear the cache,
146 manage the lifetime of cached resource bundle instances using time-to-live
147 values, or specify not to cache resource bundle instances. Refer to the
148 descriptions of the <code>getBundle</code> factory
149 method(|java.util.ResourceBundle|) , clearCache(|java.util.ResourceBundle|) ,
150 ResourceBundle.Control.getTimeToLive(|java.util.ResourceBundle.Control|) , and
151 ResourceBundle.Control.needsReload(|java.util.ResourceBundle.Control|) for
156 The following is a very simple example of a ResourceBundle subclass,
157 MyResources, that manages two resources (for a larger number of resources you
158 would probably use a Map). Notice that you don't need to supply a value if a
159 "parent-level" ResourceBundle handles the same key with the same value (as for
164 // default (English language, United States) public class MyResources extends
165 ResourceBundle { public Object handleGetObject(String key) { if
166 (key.equals("okKey")) return "Ok"; if (key.equals("cancelKey")) return
167 "Cancel"; return null; }
169 public Enumeration<String> getKeys() { return
170 Collections.enumeration(keySet()); }
172 // Overrides handleKeySet() so that the getKeys() implementation // can rely on
173 the keySet() value. protected Set<String> handleKeySet() { return new
174 HashSet<String>(Arrays.asList("okKey", "cancelKey")); } }
176 // German language public class MyResources_de extends MyResources { public
177 Object handleGetObject(String key) { // don't need okKey, since parent level
178 handles it. if (key.equals("cancelKey")) return "Abbrechen"; return null; }
180 protected Set<String> handleKeySet() { return new
181 HashSet<String>(Arrays.asList("cancelKey")); } }
183 You do not have to restrict yourself to using a single family of
184 ResourceBundles. For example, you could have a set of bundles for exception
185 messages, ExceptionResources (ExceptionResources_fr, ExceptionResources_de,
186 ...), and one for widgets, WidgetResource (WidgetResources_fr,
187 WidgetResources_de, ...); breaking up the resources however you like.
191 *java.util.ResourceBundle_java.util.ResourceBundle.parent*
193 The parent bundle of this bundle. The parent bundle is searched by
194 getObject(|java.util.ResourceBundle|) when this bundle does not contain a
199 *java.util.ResourceBundle()*
201 public ResourceBundle()
203 Sole constructor. (For invocation by subclass constructors, typically
207 *java.util.ResourceBundle.clearCache()*
209 public static final void clearCache()
211 Removes all resource bundles from the cache that have been loaded using the
212 caller's class loader.
216 *java.util.ResourceBundle.clearCache(ClassLoader)*
218 public static final void clearCache(java.lang.ClassLoader loader)
220 Removes all resource bundles from the cache that have been loaded using the
224 loader - the class loader
226 *java.util.ResourceBundle.containsKey(String)*
228 public boolean containsKey(java.lang.String key)
230 Determines whether the given key is contained in this ResourceBundle or its
234 key - the resource key
236 Returns: true if the given key is contained in this ResourceBundle or its parent
237 bundles; false otherwise.
239 *java.util.ResourceBundle.getBundle(String)*
241 public static final |java.util.ResourceBundle| getBundle(java.lang.String baseName)
243 Gets a resource bundle using the specified base name, the default locale, and
244 the caller's class loader. Calling this method is equivalent to calling
246 getBundle(baseName, Locale.getDefault(), this.getClass().getClassLoader()),
248 except that getClassLoader() is run with the security privileges of
249 ResourceBundle. See getBundle(|java.util.ResourceBundle|) for a complete
250 description of the search and instantiation strategy.
253 baseName - the base name of the resource bundle, a fully qualified class name
255 Returns: a resource bundle for the given base name and the default locale
257 *java.util.ResourceBundle.getBundle(String,Locale)*
259 public static final |java.util.ResourceBundle| getBundle(
260 java.lang.String baseName,
261 java.util.Locale locale)
263 Gets a resource bundle using the specified base name and locale, and the
264 caller's class loader. Calling this method is equivalent to calling
266 getBundle(baseName, locale, this.getClass().getClassLoader()),
268 except that getClassLoader() is run with the security privileges of
269 ResourceBundle. See getBundle(|java.util.ResourceBundle|) for a complete
270 description of the search and instantiation strategy.
273 baseName - the base name of the resource bundle, a fully qualified class name
274 locale - the locale for which a resource bundle is desired
276 Returns: a resource bundle for the given base name and locale
278 *java.util.ResourceBundle.getBundle(String,Locale,ClassLoader)*
280 public static |java.util.ResourceBundle| getBundle(
281 java.lang.String baseName,
282 java.util.Locale locale,
283 java.lang.ClassLoader loader)
285 Gets a resource bundle using the specified base name, locale, and class loader.
287 Conceptually, getBundle uses the following strategy for locating and
288 instantiating resource bundles:
290 getBundle uses the base name, the specified locale, and the default locale
291 (obtained from Locale.getDefault(|java.util.Locale|) ) to generate a sequence
292 of candidate bundle names. If the specified locale's language, country, and
293 variant are all empty strings, then the base name is the only candidate bundle
294 name. Otherwise, the following sequence is generated from the attribute values
295 of the specified locale (language1, country1, and variant1) and of the default
296 locale (language2, country2, and variant2):
298 baseName + "_" + language1 + "_" + country1 + "_" + variant1 baseName + "_" +
299 language1 + "_" + country1 baseName + "_" + language1 baseName + "_" +
300 language2 + "_" + country2 + "_" + variant2 baseName + "_" + language2 + "_" +
301 country2 baseName + "_" + language2 baseName
303 Candidate bundle names where the final component is an empty string are
304 omitted. For example, if country1 is an empty string, the second candidate
305 bundle name is omitted.
307 getBundle then iterates over the candidate bundle names to find the first one
308 for which it can instantiate an actual resource bundle. For each candidate
309 bundle name, it attempts to create a resource bundle:
311 First, it attempts to load a class using the candidate bundle name. If such a
312 class can be found and loaded using the specified class loader, is assignment
313 compatible with ResourceBundle, is accessible from ResourceBundle, and can be
314 instantiated, getBundle creates a new instance of this class and uses it as the
315 result resource bundle.
317 Otherwise, getBundle attempts to locate a property resource file. It generates
318 a path name from the candidate bundle name by replacing all "." characters with
319 "/" and appending the string ".properties". It attempts to find a "resource"
320 with this name using ClassLoader.getResource(|java.lang.ClassLoader|) . (Note
321 that a "resource" in the sense of getResource has nothing to do with the
322 contents of a resource bundle, it is just a container of data, such as a file.)
323 If it finds a "resource", it attempts to create a new
324 (|java.util.PropertyResourceBundle|) instance from its contents. If successful,
325 this instance becomes the result resource bundle.
327 If no result resource bundle has been found, a MissingResourceException is
330 Once a result resource bundle has been found, its parent chain is instantiated.
331 getBundle iterates over the candidate bundle names that can be obtained by
332 successively removing variant, country, and language (each time with the
333 preceding "_") from the bundle name of the result resource bundle. As above,
334 candidate bundle names where the final component is an empty string are
335 omitted. With each of the candidate bundle names it attempts to instantiate a
336 resource bundle, as described above. Whenever it succeeds, it calls the
337 previously instantiated resource bundle's setParent(|java.util.ResourceBundle|)
338 method with the new resource bundle, unless the previously instantiated
339 resource bundle already has a non-null parent.
341 getBundle caches instantiated resource bundles and may return the same resource
342 bundle instance multiple times.
344 The baseName argument should be a fully qualified class name. However, for
345 compatibility with earlier versions, Sun's Java SE Runtime Environments do not
346 verify this, and so it is possible to access PropertyResourceBundles by
347 specifying a path name (using "/") instead of a fully qualified class name
350 Example:The following class and property files are provided:
352 MyResources.class MyResources.properties MyResources_fr.properties
353 MyResources_fr_CH.class MyResources_fr_CH.properties MyResources_en.properties
354 MyResources_es_ES.class
356 The contents of all files are valid (that is, public non-abstract subclasses of
357 ResourceBundle for the ".class" files, syntactically correct ".properties"
358 files). The default locale is Locale("en", "GB").
360 Calling getBundle with the shown locale argument values instantiates resource
361 bundles from the following sources:
363 Locale("fr", "CH"): result MyResources_fr_CH.class, parent
364 MyResources_fr.properties, parent MyResources.class Locale("fr", "FR"): result
365 MyResources_fr.properties, parent MyResources.class Locale("de", "DE"): result
366 MyResources_en.properties, parent MyResources.class Locale("en", "US"): result
367 MyResources_en.properties, parent MyResources.class Locale("es", "ES"): result
368 MyResources_es_ES.class, parent MyResources.class
370 The file MyResources_fr_CH.properties is never used because it is hidden by
371 MyResources_fr_CH.class. Likewise, MyResources.properties is also hidden by
375 baseName - the base name of the resource bundle, a fully qualified class name
376 locale - the locale for which a resource bundle is desired
377 loader - the class loader from which to load the resource bundle
379 Returns: a resource bundle for the given base name and locale
381 *java.util.ResourceBundle.getBundle(String,Locale,ClassLoader,ResourceBundle.Control)*
383 public static |java.util.ResourceBundle| getBundle(
384 java.lang.String baseName,
385 java.util.Locale targetLocale,
386 java.lang.ClassLoader loader,
387 java.util.ResourceBundle.Control control)
389 Returns a resource bundle using the specified base name, target locale, class
390 loader and control. Unlike the <code>getBundle</code> factory methods with no
391 <code>control</code> argument(|java.util.ResourceBundle|) , the given control
392 specifies how to locate and instantiate resource bundles. Conceptually, the
393 bundle loading process with the given control is performed in the following
398 This factory method looks up the resource bundle in the cache for the specified
399 baseName, targetLocale and loader. If the requested resource bundle instance is
400 found in the cache and the time-to-live periods of the instance and all of its
401 parent instances have not expired, the instance is returned to the caller.
402 Otherwise, this factory method proceeds with the loading process below.
404 The control.getFormats(|java.util.ResourceBundle.Control|) method is called to
405 get resource bundle formats to produce bundle or resource names. The strings
406 "java.class" and "java.properties" designate class-based and
407 property(|java.util.PropertyResourceBundle|) -based resource bundles,
408 respectively. Other strings starting with "java." are reserved for future
409 extensions and must not be used for application-defined formats. Other strings
410 designate application-defined formats.
412 The control.getCandidateLocales(|java.util.ResourceBundle.Control|) method is
413 called with the target locale to get a list of candidate Locales for which
414 resource bundles are searched.
416 The control.newBundle(|java.util.ResourceBundle.Control|) method is called to
417 instantiate a ResourceBundle for the base bundle name, a candidate locale, and
418 a format. (Refer to the note on the cache lookup below.) This step is iterated
419 over all combinations of the candidate locales and formats until the newBundle
420 method returns a ResourceBundle instance or the iteration has used up all the
421 combinations. For example, if the candidate locales are Locale("de", "DE"),
422 Locale("de") and Locale("") and the formats are "java.class" and
423 "java.properties", then the following is the sequence of locale-format
424 combinations to be used to call control.newBundle.
440 Locale("de", "DE") java.properties
444 Locale("de") java.class
446 Locale("de") java.properties
452 Locale("") java.properties
458 If the previous step has found no resource bundle, proceed to Step 6. If a
459 bundle has been found that is a base bundle (a bundle for Locale("")), and the
460 candidate locale list only contained Locale(""), return the bundle to the
461 caller. If a bundle has been found that is a base bundle, but the candidate
462 locale list contained locales other than Locale(""), put the bundle on hold and
463 proceed to Step 6. If a bundle has been found that is not a base bundle,
466 The control.getFallbackLocale(|java.util.ResourceBundle.Control|) method is
467 called to get a fallback locale (alternative to the current target locale) to
468 try further finding a resource bundle. If the method returns a non-null locale,
469 it becomes the next target locale and the loading process starts over from Step
470 3. Otherwise, if a base bundle was found and put on hold in a previous Step 5,
471 it is returned to the caller now. Otherwise, a MissingResourceException is
474 At this point, we have found a resource bundle that's not the base bundle. If
475 this bundle set its parent during its instantiation, it is returned to the
476 caller. Otherwise, its parent chain is instantiated based on the list of
477 candidate locales from which it was found. Finally, the bundle is returned to
482 During the resource bundle loading process above, this factory method looks up
483 the cache before calling the
484 control.newBundle(|java.util.ResourceBundle.Control|) method. If the
485 time-to-live period of the resource bundle found in the cache has expired, the
486 factory method calls the
487 control.needsReload(|java.util.ResourceBundle.Control|) method to determine
488 whether the resource bundle needs to be reloaded. If reloading is required, the
489 factory method calls control.newBundle to reload the resource bundle. If
490 control.newBundle returns null, the factory method puts a dummy resource bundle
491 in the cache as a mark of nonexistent resource bundles in order to avoid lookup
492 overhead for subsequent requests. Such dummy resource bundles are under the
493 same expiration control as specified by control.
495 All resource bundles loaded are cached by default. Refer to
496 control.getTimeToLive(|java.util.ResourceBundle.Control|) for details.
498 The following is an example of the bundle loading process with the default
499 ResourceBundle.Control implementation.
503 Base bundle name: foo.bar.Messages Requested Locale: (|java.util.Locale|)
504 Default Locale: (|java.util.Locale|) Available resource bundles:
505 foo/bar/Messages_fr.properties and foo/bar/Messages.properties
509 First, getBundle tries loading a resource bundle in the following sequence.
511 class foo.bar.Messages_it_IT file foo/bar/Messages_it_IT.properties class
512 foo.bar.Messages_it file foo/bar/Messages_it.properties class foo.bar.Messages
513 file foo/bar/Messages.properties
515 At this point, getBundle finds foo/bar/Messages.properties, which is put on
516 hold because it's the base bundle. getBundle calls
517 control.getFallbackLocale("foo.bar.Messages",
518 Locale.ITALY)(|java.util.ResourceBundle.Control|) which returns Locale.FRENCH.
519 Next, getBundle tries loading a bundle in the following sequence.
521 class foo.bar.Messages_fr file foo/bar/Messages_fr.properties class
522 foo.bar.Messages file foo/bar/Messages.properties
524 getBundle finds foo/bar/Messages_fr.properties and creates a ResourceBundle
525 instance. Then, getBundle sets up its parent chain from the list of the
526 candiate locales. Only foo/bar/Messages.properties is found in the list and
527 getBundle creates a ResourceBundle instance that becomes the parent of the
528 instance for foo/bar/Messages_fr.properties.
531 baseName - the base name of the resource bundle, a fully qualified class name
532 targetLocale - the locale for which a resource bundle is desired
533 loader - the class loader from which to load the resource bundle
534 control - the control which gives information for the resource bundle loading process
536 Returns: a resource bundle for the given base name and locale
538 *java.util.ResourceBundle.getBundle(String,Locale,ResourceBundle.Control)*
540 public static final |java.util.ResourceBundle| getBundle(
541 java.lang.String baseName,
542 java.util.Locale targetLocale,
543 java.util.ResourceBundle.Control control)
545 Returns a resource bundle using the specified base name, target locale and
546 control, and the caller's class loader. Calling this method is equivalent to
549 getBundle(baseName, targetLocale, this.getClass().getClassLoader(), control),
551 except that getClassLoader() is run with the security privileges of
552 ResourceBundle. See getBundle(|java.util.ResourceBundle|) for the complete
553 description of the resource bundle loading process with a
554 ResourceBundle.Control.
557 baseName - the base name of the resource bundle, a fully qualified class name
558 targetLocale - the locale for which a resource bundle is desired
559 control - the control which gives information for the resource bundle loading process
561 Returns: a resource bundle for the given base name and a Locale in locales
563 *java.util.ResourceBundle.getBundle(String,ResourceBundle.Control)*
565 public static final |java.util.ResourceBundle| getBundle(
566 java.lang.String baseName,
567 java.util.ResourceBundle.Control control)
569 Returns a resource bundle using the specified base name, the default locale and
570 the specified control. Calling this method is equivalent to calling
572 getBundle(baseName, Locale.getDefault(), this.getClass().getClassLoader(),
575 except that getClassLoader() is run with the security privileges of
576 ResourceBundle. See getBundle(|java.util.ResourceBundle|) for the complete
577 description of the resource bundle loading process with a
578 ResourceBundle.Control.
581 baseName - the base name of the resource bundle, a fully qualified class name
582 control - the control which gives information for the resource bundle loading process
584 Returns: a resource bundle for the given base name and the default locale
586 *java.util.ResourceBundle.getKeys()*
588 public abstract |java.util.Enumeration|<String> getKeys()
590 Returns an enumeration of the keys.
594 Returns: an Enumeration of the keys contained in this ResourceBundle and its parent
597 *java.util.ResourceBundle.getLocale()*
599 public |java.util.Locale| getLocale()
601 Returns the locale of this resource bundle. This method can be used after a
602 call to getBundle() to determine whether the resource bundle returned really
603 corresponds to the requested locale or is a fallback.
607 Returns: the locale of this resource bundle
609 *java.util.ResourceBundle.getObject(String)*
611 public final |java.lang.Object| getObject(java.lang.String key)
613 Gets an object for the given key from this resource bundle or one of its
614 parents. This method first tries to obtain the object from this resource bundle
615 using handleGetObject(|java.util.ResourceBundle|) . If not successful, and the
616 parent resource bundle is not null, it calls the parent's getObject method. If
617 still not successful, it throws a MissingResourceException.
620 key - the key for the desired object
622 Returns: the object for the given key
624 *java.util.ResourceBundle.getString(String)*
626 public final |java.lang.String| getString(java.lang.String key)
628 Gets a string for the given key from this resource bundle or one of its
629 parents. Calling this method is equivalent to calling
631 (String) getObject(|java.util.ResourceBundle|) (key).
634 key - the key for the desired string
636 Returns: the string for the given key
638 *java.util.ResourceBundle.getStringArray(String)*
640 public final |java.lang.String|[] getStringArray(java.lang.String key)
642 Gets a string array for the given key from this resource bundle or one of its
643 parents. Calling this method is equivalent to calling
645 (String[]) getObject(|java.util.ResourceBundle|) (key).
648 key - the key for the desired string array
650 Returns: the string array for the given key
652 *java.util.ResourceBundle.handleGetObject(String)*
654 protected abstract |java.lang.Object| handleGetObject(java.lang.String key)
656 Gets an object for the given key from this resource bundle. Returns null if
657 this resource bundle does not contain an object for the given key.
660 key - the key for the desired object
662 Returns: the object for the given key, or null
664 *java.util.ResourceBundle.handleKeySet()*
666 protected |java.util.Set|<String> handleKeySet()
668 Returns a Set of the keys contained only in this ResourceBundle.
670 The default implementation returns a Set of the keys returned by the
671 getKeys(|java.util.ResourceBundle|) method except for the ones for which the
672 handleGetObject(|java.util.ResourceBundle|) method returns null. Once the Set
673 has been created, the value is kept in this ResourceBundle in order to avoid
674 producing the same Set in the next calls. Override this method in subclass
675 implementations for faster handling.
679 Returns: a Set of the keys contained only in this ResourceBundle
681 *java.util.ResourceBundle.keySet()*
683 public |java.util.Set|<String> keySet()
685 Returns a Set of all keys contained in this ResourceBundle and its parent
690 Returns: a Set of all keys contained in this ResourceBundle and its parent bundles.
692 *java.util.ResourceBundle.setParent(ResourceBundle)*
694 protected void setParent(java.util.ResourceBundle parent)
696 Sets the parent bundle of this bundle. The parent bundle is searched by
697 getObject(|java.util.ResourceBundle|) when this bundle does not contain a
701 parent - this bundle's parent bundle.