|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectuk.ac.ed.inf.utils.PropertiesUtils
public class PropertiesUtils
Utilities to manipulate Java properties and properties text files
| Constructor Summary | |
|---|---|
PropertiesUtils()
|
|
| Method Summary | |
|---|---|
static void |
getJavaSystemProperties()
Gets the Java system properties |
static java.util.Vector<java.lang.String> |
getKeysStrings(java.util.Properties props)
Get the properties keys as strings |
static java.util.Vector<java.lang.String> |
getValuesStrings(java.util.Properties props)
Get the properties values as strings |
static java.util.Properties |
readLocalProperties(java.lang.String resourceName)
Reads properties that inherit from three locations. |
static java.util.Properties |
readProperties(java.lang.String propertiesFilePath)
Reads properties Code adapted from Weka: http://www.cs.waikato.ac.nz/ml/weka/ Ian H. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public PropertiesUtils()
| Method Detail |
|---|
public static void getJavaSystemProperties()
public static java.util.Vector<java.lang.String> getKeysStrings(java.util.Properties props)
props - a properties object
public static java.util.Vector<java.lang.String> getValuesStrings(java.util.Properties props)
props - a properties object
public static java.util.Properties readLocalProperties(java.lang.String resourceName)
throws java.lang.Exception
resourceName - the location of the resource that should be loaded. e.g.:
"weka/core/Utils.props". (The use of hardcoded forward slashes
here is OK - see jdk1.1/docs/guide/misc/resources.html) This
routine will also look for the file (in this case)
"Utils.props" in the users home directory and the current
directory.
java.lang.Exception - if no default properties are defined, or if an error
occurs reading the properties files.
public static java.util.Properties readProperties(java.lang.String propertiesFilePath)
throws java.lang.Exception
java.lang.Exception - if no default properties are defined, or if an error
occurs reading the properties files.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||