public class Util
extends java.lang.Object
| Modifier | Constructor and Description |
|---|---|
protected |
Util()
Creates a new instance of Util
|
| Modifier and Type | Method and Description |
|---|---|
static java.util.Map<java.lang.String,java.lang.String> |
getPropertiesForResource(java.lang.String propertyFile)
Convenience method for loading the resource bundle from a file whose path is specified relative to the application's resources folder.
|
protected static java.lang.String[] |
getTokens(java.lang.String string)
Parse a string into tokens where whitespace is the delimiter.
|
protected static java.lang.String[] |
getTokens(java.lang.String string,
java.lang.String delim)
Parse a string into tokens with the specified delimiter.
|
static java.util.Map<java.lang.String,java.lang.String> |
loadResourceBundle(java.net.URL resourceURL)
Load the resource bundle specified by the URL.
|
static void |
mergeResourceBundle(java.util.Map<java.lang.String,java.lang.String> map,
java.net.URL source)
Merge the resource bundle from the specified source into the specified map.
|
public static java.util.Map<java.lang.String,java.lang.String> loadResourceBundle(java.net.URL resourceURL)
throws java.lang.RuntimeException
resourceURL - The URL to the properties filejava.lang.RuntimeExceptionpublic static void mergeResourceBundle(java.util.Map<java.lang.String,java.lang.String> map,
java.net.URL source)
map - the map into which the resources should be mergedsource - URL to the resource to mergepublic static java.util.Map<java.lang.String,java.lang.String> getPropertiesForResource(java.lang.String propertyFile)
propertyFile - The property file relative to the application's resources folderjava.util.MissingResourceException - If the resource bundle cannot be found.loadResourceBundle(java.net.URL)protected static java.lang.String[] getTokens(java.lang.String string)
string - The string to parse.protected static java.lang.String[] getTokens(java.lang.String string,
java.lang.String delim)
string - The string to parse.delim - The delimiter