|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object | +--org.infoglue.cms.util.ResourceHelper
Utility class for loading/manipulating resources (must be accessible from the classpath).
| Method Summary | |
static java.io.InputStream |
getResourceAsStream(java.lang.String resourceName,
java.lang.Class callingClass)
Find a resource with a variety of fallback ClassLoaders. |
static java.util.Properties |
loadProperties(java.lang.String name)
Loads the specified property file into a Properties object. |
static java.lang.String |
readResource(java.lang.String name)
Loads the specified resource file and returns the content as a string. |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
public static java.util.Properties loadProperties(java.lang.String name)
Loads the specified property file into a Properties object.
Example: ResourceHelper.loadProperties("se/sprawl/cms/CMSProperties.properties");
name - the name of the resource ("/"-separated path name).public static java.lang.String readResource(java.lang.String name)
Loads the specified resource file and returns the content as a string.
Example: ResourceHelper.readResource("se/sprawl/cms/CMSSQL.sql");
name - the name of the resource ("/"-separated path name).
public static java.io.InputStream getResourceAsStream(java.lang.String resourceName,
java.lang.Class callingClass)
resourceName - The name of the resource to find. ("/"-separated path name)callingClass - The class looking for the resource
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||