public void load(Path settingsPath){
  mLoadingSettings=true;
  if (Files.exists(settingsPath)) {
    mLog.info("SettingsManager - loading settings file [" + settingsPath.toString() + "]");
    JAXBContext context=null;
    InputStream in=null;
    try {
      in=new FileInputStream(settingsPath.toString());
      try {
        context=JAXBContext.newInstance(Settings.class);
        Unmarshaller m=context.createUnmarshaller();
        mSettings=(Settings)m.unmarshal(in);
      }
 catch (      JAXBException e) {
        mLog.error("SettingsManager - jaxb exception while loading " + "settings",e);
      }
    }
 catch (    Exception e) {
      mLog.error("SettingsManager - coulcn't open inputstream to " + "load settings [" + settingsPath.toString() + "]",e);
    }
 finally {
      if (in != null) {
        try {
          in.close();
        }
 catch (        IOException e) {
          mLog.error("SettingsManager - exception while closing " + "the settings file inputstream reader",e);
        }
      }
    }
  }
 else {
    mLog.info("SettingsManager - settings does not exist [" + settingsPath.toString() + "]");
  }
  if (mSettings == null) {
    mSettings=new Settings();
  }
  loadTunerConfigurationModel();
  mLoadingSettings=false;
}

public void load ( Path settingsPath ) { mLoadingSettings = true ; if ( Files . exists ( settingsPath ) ) { mLog . info ( "SettingsManager - loading settings file [" + settingsPath . toString ( ) + "]" ) ; JAXBContext context = null ; InputStream in = null ; try { in = new FileInputStream ( settingsPath . toString ( ) ) ; try { context = JAXBContext . newInstance ( Settings . class ) ; Unmarshaller m = context . createUnmarshaller ( ) ; mSettings = ( Settings ) m . unmarshal ( in ) ; } catch ( JAXBException e ) { mLog . error ( "SettingsManager - jaxb exception while loading " + "settings" , e ) ; } } catch ( Exception e ) { mLog . error ( "SettingsManager - coulcn't open inputstream to " + "load settings [" + settingsPath . toString ( ) + "]" , e ) ; } finally { if ( in != null ) { try { in . close ( ) ; } catch ( IOException e ) { mLog . error ( "SettingsManager - exception while closing " + "the settings file inputstream reader" , e ) ; } } } } else { mLog . info ( "SettingsManager - settings does not exist [" + settingsPath . toString ( ) + "]" ) ; } if ( mSettings == null ) { mSettings = new Settings ( ) ; } loadTunerConfigurationModel ( ) ; mLoadingSettings = false ; }
erases current settings and loads settings from the settingspath filename , if it exists .
