public boolean saveConfiguration(final String path){
  if (xmlConfig != null && !errors.hasFailed()) {
    boolean success=true;
    FileWriter writer=null;
    try {
      writer=new FileWriter(path);
      writer.write(xmlConfig.toString());
      writer.flush();
    }
 catch (    IOException ioe) {
      ioe.printStackTrace();
      success=false;
    }
 finally {
      if (writer != null) {
        try {
          writer.close();
        }
 catch (        IOException ioe) {
          success=false;
        }
      }
    }
    return success;
  }
  return false;
}

public boolean saveConfiguration ( final String path ) { if ( xmlConfig != null && ! errors . hasFailed ( ) ) { boolean success = true ; FileWriter writer = null ; try { writer = new FileWriter ( path ) ; writer . write ( xmlConfig . toString ( ) ) ; writer . flush ( ) ; } catch ( IOException ioe ) { ioe . printStackTrace ( ) ; success = false ; } finally { if ( writer != null ) { try { writer . close ( ) ; } catch ( IOException ioe ) { success = false ; } } } return success ; } return false ; }
save the configuration to a file .
