public void loadPropertiesFromFile ( final String propertiesFile ) throws IOException { LOG . info ( "Loading properties from file: " + propertiesFile ) ; File file = new File ( propertiesFile ) ; String bundleName = file . getPath ( ) . substring ( 0 , file . getPath ( ) . indexOf ( "properties" ) - 1 ) ; FileInputStream inputStream = null ; try { inputStream = new FileInputStream ( file ) ; ResourceBundle bundle = new PropertyResourceBundle ( inputStream ) ; LOG . info ( "Adding to bunlde: " + bundleName ) ; bundles . put ( bundleName , bundle ) ; } finally { if ( inputStream != null ) { inputStream . close ( ) ; } } }
Loads the properties from a file specified as a parameter .