Package com.saperion.util
Class ConfigReader
- java.lang.Object
-
- com.saperion.util.ConfigReader
-
public final class ConfigReader extends java.lang.Object
Helper class providing read methods for access to configuration/property files.- Author:
- mak
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.io.InputStream
getConfigStream(java.lang.String configuration)
Tries to read the source from different destinations.static java.util.Properties
loadProperties(java.lang.String propertyFileName)
Loads the given properties from the file system or from the classpath.
-
-
-
Method Detail
-
loadProperties
public static java.util.Properties loadProperties(java.lang.String propertyFileName) throws java.io.IOException
Loads the given properties from the file system or from the classpath.- Parameters:
propertyFileName
- the name of the property file to be loaded- Returns:
Properties
- Throws:
java.io.IOException
- in case of property file does not exist or cannot be loaded.
-
getConfigStream
public static java.io.InputStream getConfigStream(java.lang.String configuration) throws java.io.IOException
Tries to read the source from different destinations.- Parameters:
configuration
- The source file name- Returns:
- The input stream of this source
- Throws:
java.io.IOException
- in case of configuration file does not exist.
-
-