ca.tnt.ldaputils
Class Property

Package class diagram package Property
java.lang.Object
  extended by ca.tnt.ldaputils.Property

public class Property
extends Object

Property loading utility class

Created : Aug 6, 2005 6:14:50 PM MST

Modified : $Date: 2008-03-21T05:44:48.218433Z $ UTC

Revision : $Revision: 692 $

Author:
Trenton D. Adams

Constructor Summary
Property()
           
 
Method Summary
static Properties loadProperties(String fileName)
          Loads the properties from the given fileName.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Property

public Property()
Method Detail

loadProperties

public static Properties loadProperties(String fileName)
Loads the properties from the given fileName. It first checks the CLASSPATH for the location of the file, and then checks the fully qualified path to the file if it was unable to load it. So, if you made the fileName parameter "/etc/somefile.properties", it would attempt to load the file from "somewhere_on_the_filesystem/etc/somefile.properties". Where somewhere_on_the_filesystem is a directory in the CLASSPATH. If that could not be found, then it will attempt "/etc/somefile.properties". If unable to load the properties it returns null. For further information on loading files from the CLASSPATH, see Class.getResourceAsStream();

Parameters:
fileName - the filename to load properties from
Returns:
a Properties object if successful or null otherwise