|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object | +--uk.ac.ebi.intact.util.PropertyLoader
Allow to create a set of properties from a file.
example :
let's say the onfig/database.properties file contains :
database.login=username
---
Properties props = PropertyLoader.load ("config/database.properties");
if (props != null) {
String login = props.getProperty ("database.login");
// ...
} else {
System.err.println ("Unable to open the properties file.");
}
| Method Summary | |
static java.lang.String |
getContent(java.lang.String propName,
java.lang.String lineSeparator)
get the content of the property file int a String |
static java.util.Properties |
load(java.lang.String propName)
Allows to get a set of property or null from a property file. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
public static java.util.Properties load(java.lang.String propName)
propName - the name of the property file
public static java.lang.String getContent(java.lang.String propName,
java.lang.String lineSeparator)
propName - the name of the property filelineSeparator - line separator between two properties
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||