Package com.saperion.util
Class ConfigReader
java.lang.Object
com.saperion.util.ConfigReader
Helper class providing read methods for access to configuration/property
files.
- Author:
- mak
-
Method Summary
Modifier and TypeMethodDescriptionstatic InputStream
getConfigStream
(String configuration) Tries to read the source from different destinations.static Properties
loadProperties
(String propertyFileName) Loads the given properties from the file system or from the classpath.
-
Method Details
-
loadProperties
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:
IOException
- in case of property file does not exist or cannot be loaded.
-
getConfigStream
Tries to read the source from different destinations.- Parameters:
configuration
- The source file name- Returns:
- The input stream of this source
- Throws:
IOException
- in case of configuration file does not exist.
-