|
spring-core | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.springframework.core.io.support.PropertiesLoaderUtils
public abstract class PropertiesLoaderUtils
Convenient utility methods for loading of java.util.Properties,
performing standard handling of input streams.
For more configurable properties loading, including the option of a customized encoding, consider using the PropertiesLoaderSupport class.
PropertiesLoaderSupport| Constructor Summary | |
|---|---|
PropertiesLoaderUtils()
|
|
| Method Summary | |
|---|---|
static void |
fillProperties(java.util.Properties props,
Resource resource)
Fill the given properties from the given resource. |
static java.util.Properties |
loadAllProperties(java.lang.String resourceName)
Load all properties from the given class path resource, using the default class loader. |
static java.util.Properties |
loadAllProperties(java.lang.String resourceName,
java.lang.ClassLoader classLoader)
Load all properties from the given class path resource, using the given class loader. |
static java.util.Properties |
loadProperties(Resource resource)
Load properties from the given resource. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public PropertiesLoaderUtils()
| Method Detail |
|---|
public static java.util.Properties loadProperties(Resource resource)
throws java.io.IOException
resource - the resource to load from
java.io.IOException - if loading failed
public static void fillProperties(java.util.Properties props,
Resource resource)
throws java.io.IOException
props - the Properties instance to fillresource - the resource to load from
java.io.IOException - if loading failed
public static java.util.Properties loadAllProperties(java.lang.String resourceName)
throws java.io.IOException
Merges properties if more than one resource of the same name found in the class path.
resourceName - the name of the class path resource
java.io.IOException - if loading failed
public static java.util.Properties loadAllProperties(java.lang.String resourceName,
java.lang.ClassLoader classLoader)
throws java.io.IOException
Merges properties if more than one resource of the same name found in the class path.
resourceName - the name of the class path resourceclassLoader - the ClassLoader to use for loading
(or null to use the default class loader)
java.io.IOException - if loading failed
|
spring-core | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||