org.apache.batik.util.resources

Class ResourceManager

public class ResourceManager extends Object

This class offers convenience methods to decode resource bundle entries
Field Summary
protected ResourceBundlebundle
The managed resource bundle
Constructor Summary
ResourceManager(ResourceBundle rb)
Creates a new resource manager
Method Summary
booleangetBoolean(String key)
Returns the boolean mapped with the given key
intgetCharacter(String key)
intgetInteger(String key)
Returns the integer mapped with the given string
StringgetString(String key)
Returns the string that is mapped with the given key
ListgetStringList(String key)
Returns the tokens that compose the string mapped with the given key.
ListgetStringList(String key, String delim)
Returns the tokens that compose the string mapped with the given key.
ListgetStringList(String key, String delim, boolean returnDelims)
Returns the tokens that compose the string mapped with the given key

Field Detail

bundle

protected ResourceBundle bundle
The managed resource bundle

Constructor Detail

ResourceManager

public ResourceManager(ResourceBundle rb)
Creates a new resource manager

Parameters: rb a resource bundle

Method Detail

getBoolean

public boolean getBoolean(String key)
Returns the boolean mapped with the given key

Parameters: key a key of the resource bundle

Throws: MissingResourceException if key is not the name of a resource ResourceFormatException if the resource is malformed

getCharacter

public int getCharacter(String key)

getInteger

public int getInteger(String key)
Returns the integer mapped with the given string

Parameters: key a key of the resource bundle

Throws: MissingResourceException if key is not the name of a resource ResourceFormatException if the resource is malformed

getString

public String getString(String key)
Returns the string that is mapped with the given key

Parameters: key a key in the resource bundle

Throws: MissingResourceException if key is not the name of a resource

getStringList

public List getStringList(String key)
Returns the tokens that compose the string mapped with the given key. Delimiters (" \t\n\r\f") are not returned.

Parameters: key a key of the resource bundle

Throws: MissingResourceException if key is not the name of a resource

getStringList

public List getStringList(String key, String delim)
Returns the tokens that compose the string mapped with the given key. Delimiters are not returned.

Parameters: key a key of the resource bundle delim the delimiters of the tokens

Throws: MissingResourceException if key is not the name of a resource

getStringList

public List getStringList(String key, String delim, boolean returnDelims)
Returns the tokens that compose the string mapped with the given key

Parameters: key a key of the resource bundle delim the delimiters of the tokens returnDelims if true, the delimiters are returned in the list

Throws: MissingResourceException if key is not the name of a resource

Copyright B) 2008 Apache Software Foundation. All Rights Reserved.