private void loadPropFile ( String propFileName ) throws IOException , Error { InputStream inputStream = null ; try { inputStream = getClass ( ) . getClassLoader ( ) . getResourceAsStream ( propFileName ) ; if ( inputStream != null ) { this . prop . load ( inputStream ) ; LOGGER . debug ( "properties file " + propFileName + " loaded succesfully" ) ; } else { String errorMsg = "properties file '" + propFileName + "' not found in the classpath" ; LOGGER . error ( errorMsg ) ; throw new Error ( errorMsg , Error . SETTINGS_FILE_NOT_FOUND ) ; } } finally { try { if ( inputStream != null ) { inputStream . close ( ) ; } } catch ( IOException e ) { LOGGER . warn ( "properties file '" + propFileName + "' not closed properly." ) ; } } }
Loads the settings from the properties file