private void loadProperties(){
  String property=System.getProperty("carbon.properties.filepath");
  if (null == property) {
    property=CarbonCommonConstants.CARBON_PROPERTIES_FILE_PATH;
  }
  File file=new File(property);
  LOGGER.info("Property file path: " + file.getAbsolutePath());
  FileInputStream fis=null;
  try {
    if (file.exists()) {
      fis=new FileInputStream(file);
      carbonProperties.load(fis);
    }
  }
 catch (  FileNotFoundException e) {
    LOGGER.error("The file: " + CarbonCommonConstants.CARBON_PROPERTIES_FILE_PATH + " does not exist");
  }
catch (  IOException e) {
    LOGGER.error("Error while reading the file: " + CarbonCommonConstants.CARBON_PROPERTIES_FILE_PATH);
  }
 finally {
    if (null != fis) {
      try {
        fis.close();
      }
 catch (      IOException e) {
        LOGGER.error("Error while closing the file stream for file: " + CarbonCommonConstants.CARBON_PROPERTIES_FILE_PATH);
      }
    }
  }
  print();
}

private void loadProperties ( ) { String property = System . getProperty ( "carbon.properties.filepath" ) ; if ( null == property ) { property = CarbonCommonConstants . CARBON_PROPERTIES_FILE_PATH ; } File file = new File ( property ) ; LOGGER . info ( "Property file path: " + file . getAbsolutePath ( ) ) ; FileInputStream fis = null ; try { if ( file . exists ( ) ) { fis = new FileInputStream ( file ) ; carbonProperties . load ( fis ) ; } } catch ( FileNotFoundException e ) { LOGGER . error ( "The file: " + CarbonCommonConstants . CARBON_PROPERTIES_FILE_PATH + " does not exist" ) ; } catch ( IOException e ) { LOGGER . error ( "Error while reading the file: " + CarbonCommonConstants . CARBON_PROPERTIES_FILE_PATH ) ; } finally { if ( null != fis ) { try { fis . close ( ) ; } catch ( IOException e ) { LOGGER . error ( "Error while closing the file stream for file: " + CarbonCommonConstants . CARBON_PROPERTIES_FILE_PATH ) ; } } } print ( ) ; }
this method will read all the properties from file and load it into memory
