org.apache.commons.scaffold.util
Class ResourceUtils

java.lang.Object
  extended byorg.apache.commons.scaffold.util.ResourceUtils

public class ResourceUtils
extends java.lang.Object

Property and Resource utilities.

Version:
$Revision: 1.4 $ $Date: 2004/03/21 21:10:10 $

Constructor Summary
ResourceUtils()
           
 
Method Summary
static java.util.Properties loadProperties(java.lang.Object caller, java.lang.String path)
          Load a properties file.
static java.util.Properties loadProperties(java.lang.String path)
           
static java.util.Properties loadPropertiesFile(java.lang.String path)
          Load a properties file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ResourceUtils

public ResourceUtils()
Method Detail

loadProperties

public static final java.util.Properties loadProperties(java.lang.Object caller,
                                                        java.lang.String path)
                                                 throws java.lang.Exception
Load a properties file. The path must include the package name(s), if any, in system directory format and include the properties extension.

Parameters:
caller - The object making the call. Needed to access ClassLoader.
path - The path to the properties file
Returns:
The initialized Properties object
Throws:
javax.servlet.UnavailableException - if resource cannot be found
java.lang.Exception

loadProperties

public static final java.util.Properties loadProperties(java.lang.String path)
                                                 throws java.lang.Exception
Throws:
java.lang.Exception

loadPropertiesFile

public static final java.util.Properties loadPropertiesFile(java.lang.String path)
Load a properties file. This is a simplified version of loadProperties(Object, String).

Parameters:
path - The path to the properties file
Returns:
The initialized Properties object


Copyright © 2002-2005 The Apache Software Foundation. All Rights Reserved.