code: public void changedProps(final String filePath, final Map props) {
          history.push(new Action() {
              public ReturnCode execute() {
                  final File file = new File(filePath);
                  final Properties propsObj = new Properties();
                  InputStream is = null;
                  OutputStream os = null;
                  try {
                      is = new FileInputStream(file);
                      propsObj.load(is);
  
                      // Restore old property values.
                      Iterator entries = props.entrySet().iterator();
                      while (entries.hasNext()) {
                          Map.Entry entry = (Map.Entry) entries.next();
                          String key = (String) entry.getKey();
                          String value = ((String[]) entry.getValue())[0];
                          propsObj.setProperty(key, value);
                      }
  
                      os = new FileOutputStream(file);
                      propsObj.store(os, null);
                      return ReturnCode.OK;
                  } catch (IOException ioe) {
                      return new ReturnCode(ReturnCode.BAD_INPUT);
                  } finally {
                      SelfExtractUtils.tryToClose(is);
                      SelfExtractUtils.tryToClose(os);
                  }
              }
          });
      }
docs: map: key is property name, value [] is of {old value, new value}