uk.ac.ebi.intact.util
Class PropertyLoader

java.lang.Object
  |
  +--uk.ac.ebi.intact.util.PropertyLoader

public class PropertyLoader
extends java.lang.Object

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.");
   }
   

Version:
$Id: PropertyLoader.java,v 1.1 2003/07/15 11:04:04 skerrien Exp $
Author:
Samuel Kerrien (skerrien@ebi.ac.uk)

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

load

public static java.util.Properties load(java.lang.String propName)
Allows to get a set of property or null from a property file.

Parameters:
propName - the name of the property file
Returns:
a set of property or null

getContent

public static java.lang.String getContent(java.lang.String propName,
                                          java.lang.String lineSeparator)
get the content of the property file int a String

Parameters:
propName - the name of the property file
lineSeparator - line separator between two properties
Returns:
the content of the property file


IntAct Project - EMBL-EBI 2004 - intact-help@ebi.ac.uk