public class

ResourceBundleWrapper

extends Object
java.lang.Object
   ↳ org.jfree.chart.util.ResourceBundleWrapper

Class Overview

Wrapper of ResourceBundle.getBundle() methods. This wrapper is introduced to avoid a dramatic performance penalty by superfluous resource (and classes loaded by Class.forName) lookups on web server in applets.

 public class AppletC extends javax.swing.JApplet {
    public void init() {
       ResourceBundleWrapper.removeCodeBase(getCodeBase(),
               (URLClassLoader) getClass().getClassLoader());
    ...
 

Summary

Public Methods
final static ResourceBundle getBundle(String baseName, Locale locale)
Finds and returns the specified resource bundle.
static ResourceBundle getBundle(String baseName, Locale locale, ClassLoader loader)
Maps directly to ResourceBundle.getBundle(baseName, locale, loader).
final static ResourceBundle getBundle(String baseName)
Finds and returns the specified resource bundle.
static void removeCodeBase(URL codeBase, URLClassLoader urlClassLoader)
Instantiate a URLClassLoader for resource lookups where the codeBase URL is removed.
[Expand]
Inherited Methods
From class java.lang.Object

Public Methods

public static final ResourceBundle getBundle (String baseName, Locale locale)

Finds and returns the specified resource bundle.

Parameters
baseName the base name.
locale the locale.
Returns
  • The resource bundle.

public static ResourceBundle getBundle (String baseName, Locale locale, ClassLoader loader)

Maps directly to ResourceBundle.getBundle(baseName, locale, loader).

Parameters
baseName the base name.
locale the locale.
loader the class loader.
Returns
  • The resource bundle.

public static final ResourceBundle getBundle (String baseName)

Finds and returns the specified resource bundle.

Parameters
baseName the base name.
Returns
  • The resource bundle.

public static void removeCodeBase (URL codeBase, URLClassLoader urlClassLoader)

Instantiate a URLClassLoader for resource lookups where the codeBase URL is removed. This method is typically called from an applet's init() method. If this method is never called, the getBundle() methods map to the standard ResourceBundle lookup methods.

Parameters
codeBase the codeBase URL.
urlClassLoader the class loader.