public abstract class PropertyLoader extends Object
Constructor and Description |
---|
PropertyLoader() |
Modifier and Type | Method and Description |
---|---|
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.
|
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]IllegalArgumentException
- if the resource was not found and
THROW_ON_LOAD_FAILURE is truepublic static Properties loadProperties(String name)
loadProperties(String, ClassLoader)
that uses the current thread's context classloader.Copyright © 2008–2017 MIL-OSS. All rights reserved.