Class ConfigReader

java.lang.Object
com.saperion.util.ConfigReader

public final class ConfigReader extends Object
Helper class providing read methods for access to configuration/property files.
Author:
mak
  • Method Details

    • loadProperties

      public static Properties loadProperties(String propertyFileName) throws 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:
      IOException - in case of property file does not exist or cannot be loaded.
    • getConfigStream

      public static InputStream getConfigStream(String configuration) throws IOException
      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.