de.ispsoft.jaxme.util
Class ResourceBundle

java.lang.Object
  extended byde.ispsoft.jaxme.util.ResourceBundle

public class ResourceBundle
extends java.lang.Object

A set of utility methods for working with Resource Bundles.

Version:
$Id: ResourceBundle.java,v 1.3 2003/01/08 18:42:12 joe Exp $
Author:
Jochen Wiedmann

Constructor Summary
ResourceBundle()
           
 
Method Summary
static java.lang.String getNonNullResourceValue(java.util.ResourceBundle pBundle, java.lang.String pKey)
          Does a lookup for key pKey in the ResourceBundle pBundle.
static java.lang.String getResourceValue(java.util.ResourceBundle pBundle, java.lang.String pKey)
          Does a lookup for key pKey in the ResourceBundle pBundle.
static java.lang.String getResourceValue(java.util.ResourceBundle pBundle, java.lang.String pKey, java.lang.String pDefault)
          Does a lookup for key pKey in the ResourceBundle pBundle.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ResourceBundle

public ResourceBundle()
Method Detail

getResourceValue

public static java.lang.String getResourceValue(java.util.ResourceBundle pBundle,
                                                java.lang.String pKey)

Does a lookup for key pKey in the ResourceBundle pBundle. A possible MissingResourceException is catched.

Returns:
Resource value or null, if a MissingResourceException was thrown

getResourceValue

public static java.lang.String getResourceValue(java.util.ResourceBundle pBundle,
                                                java.lang.String pKey,
                                                java.lang.String pDefault)

Does a lookup for key pKey in the ResourceBundle pBundle. Returns the lookup result or the default pDefault, if a null value would be returned or a MissingResourceException is thrown.

Returns:
Resource value or null, if a MissingResourceException was thrown

getNonNullResourceValue

public static java.lang.String getNonNullResourceValue(java.util.ResourceBundle pBundle,
                                                       java.lang.String pKey)
                                                throws org.xml.sax.SAXException

Does a lookup for key pKey in the ResourceBundle pBundle. A possible MissingResourceException is catched and converted into a SAXException.

Returns:
Resource value
Throws:
org.xml.sax.SAXException - Contains a nested MissingResourceException