Package com.aspectran.core.util
Class PropertiesLoaderUtils
- java.lang.Object
-
- com.aspectran.core.util.PropertiesLoaderUtils
-
public class PropertiesLoaderUtils extends java.lang.ObjectConvenient utility methods for loading of java.util.Properties, performing standard handling of input streams.
-
-
Constructor Summary
Constructors Constructor Description PropertiesLoaderUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidfillProperties(java.util.Properties props, java.lang.String resourceName)Fill the given properties from the specified class path resource (in ISO-8859-1 encoding).static voidfillProperties(java.util.Properties props, java.lang.String resourceName, java.lang.ClassLoader classLoader)Fill the given properties from the specified class path resource (in ISO-8859-1 encoding).static java.util.PropertiesloadProperties(java.lang.String resourceName)Load all properties from the specified class path resource (in ISO-8859-1 encoding), using the default class loader.static java.util.PropertiesloadProperties(java.lang.String resourceName, java.lang.ClassLoader classLoader)Load all properties from the specified class path resource (in ISO-8859-1 encoding), using the given class loader.
-
-
-
Method Detail
-
loadProperties
public static java.util.Properties loadProperties(java.lang.String resourceName) throws java.io.IOExceptionLoad all properties from the specified class path resource (in ISO-8859-1 encoding), using the default class loader.Merges properties if more than one resource of the same name found in the class path.
- Parameters:
resourceName- the name of the class path resource- Returns:
- the Properties instance
- Throws:
java.io.IOException- if loading failed
-
loadProperties
public static java.util.Properties loadProperties(java.lang.String resourceName, java.lang.ClassLoader classLoader) throws java.io.IOExceptionLoad all properties from the specified class path resource (in ISO-8859-1 encoding), using the given class loader.Merges properties if more than one resource of the same name found in the class path.
- Parameters:
resourceName- the name of the class path resourceclassLoader- the class loader- Returns:
- the Properties instance
- Throws:
java.io.IOException- if loading failed
-
fillProperties
public static void fillProperties(java.util.Properties props, java.lang.String resourceName) throws java.io.IOExceptionFill the given properties from the specified class path resource (in ISO-8859-1 encoding).Merges properties if more than one resource of the same name found in the class path.
- Parameters:
props- the Properties instance to load intoresourceName- the name of the class path resource- Throws:
java.io.IOException- if loading failed
-
fillProperties
public static void fillProperties(java.util.Properties props, java.lang.String resourceName, java.lang.ClassLoader classLoader) throws java.io.IOExceptionFill the given properties from the specified class path resource (in ISO-8859-1 encoding).Merges properties if more than one resource of the same name found in the class path.
- Parameters:
props- the Properties instance to load intoresourceName- the name of the class path resourceclassLoader- the class loader- Throws:
java.io.IOException- if loading failed
-
-