code: public void save(File file,
                       String comment,
                       boolean saveDefaults,
                       String propertyName) throws IOException
      {
          gatekeeper.lock();
          try
          {
              File parent = file.getParentFile();
              if (!parent.exists() && !parent.mkdirs())
              {
                  throw new IOException("Directory at \""
                                        + parent.getAbsolutePath()
                                        + "\" does not exist and cannot be created");
              }
  
              FileOutputStream outputStream = new FileOutputStream(file);
              try
              {
                  Properties tmpProperties = getProperties(saveDefaults,
                                                           propertyName);
                  tmpProperties.store(outputStream, comment);
  
                  /*
                   * If we only saved a single property, only that property should
                   * be marked synced.
                   */
                  if (propertyName != null)
                  {
                      properties.get(propertyName).synced();
                  }
                  else
                  {
                      for (ChangeStack<String> stack : properties.values())
                      {
                          stack.synced();
                      }
                  }
              }
              finally
              {
                  outputStream.close();
              }
          }
          finally
          {
              gatekeeper.unlock();
          }
      }
docs: Save the current state of the given property to the given file without
  saving all of the other properties within this instance.
  
  @param file
  the file to which the current properties and their values will
  be written
  @param comment
  an optional comment to put at the top of the file (
  <code>null</code> means no comment)
  @param saveDefaults
  if <code>true</code>, values that match the default will be
  written to the file; otherwise values matching the default
  will be skipped
  @param propertyName
  the name of the property to save at its current value while
  the others will retain the last saved value (if
  <code>null</code>, all properties will be saved with their
  current values)
  @throws IOException
  if there is an error writing the given file