|
MDi JLib 1.7.4 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.microdeveloper.util.io.property.PropertyLoader
public abstract class PropertyLoader
A Class used for loading properties by relative path using URL naming conventions.
Example usage:
PropertyLoader pl = PropertyLoader.loadProperties("com.microdeveloper.properties.myPropertyFile");
Method Summary | |
---|---|
static Properties |
loadProperties(String name)
A convenience overload of loadProperties(String, ClassLoader)
that uses the current thread's context classloader. |
static Properties |
loadProperties(String name,
ClassLoader loader)
Looks up a resource named 'name' in the classpath. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static Properties loadProperties(String name, ClassLoader loader)
some.pkg.Resource some.pkg.Resource.properties some/pkg/Resource some/pkg/Resource.properties /some/pkg/Resource /some/pkg/Resource.properties
name
- classpath resource name [may not be null]loader
- classloader through which to load the resource [null
is equivalent to the application loader]
public static Properties loadProperties(String name)
loadProperties(String, ClassLoader)
that uses the current thread's context classloader. A better strategy
would be to use techniques shown in
http://www.javaworld.com/javaworld/javaqa/2003-06/01-qa-0606-load.html
name
- relative properties file using package.class nomenclature
|
MDi JLib 1.7.4 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |