org.apache.commons.scaffold.util
Class ResourceUtils

java.lang.Object
  extended by org.apache.commons.scaffold.util.ResourceUtils

public class ResourceUtils
extends Object

Property and Resource utilities.

Version:
$Revision: 155464 $ $Date: 2005-02-26 13:26:54 +0000 (Sat, 26 Feb 2005) $
Author:
Ted Husted

Constructor Summary
ResourceUtils()
           
 
Method Summary
static Properties loadProperties(Object caller, String path)
          Load a properties file.
static Properties loadProperties(String path)
           
static Properties loadPropertiesFile(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 Properties loadProperties(Object caller,
                                              String path)
                                       throws 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
Exception

loadProperties

public static final Properties loadProperties(String path)
                                       throws Exception
Throws:
Exception

loadPropertiesFile

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

Parameters:
caller - The object making the call. Needed to access ClassLoader.
path - The path to the properties file
Returns:
The initialized Properties object


Copyright © 2001-2010 The Apache Software Foundation. All Rights Reserved.