class GrinderProperties extends Properties {

  public final void saveSingleProperty(String name)
    throws PersistenceException {

    if (m_file == null) {
      throw new PersistenceException("No associated file");
    }

    try {
      final Properties properties = new Properties();

      InputStream inputStream = null;

      try {
        inputStream = new FileInputStream(m_file);
        properties.load(inputStream);
      }
      catch (IOException e) {
        // Can't read the file, maybe its not there. Ignore.
        UncheckedInterruptedException.ioException(e);
      }
      finally {
        Closer.close(inputStream);
      }

      OutputStream outputStream = null;

      try {
        outputStream = new FileOutputStream(m_file);

        final String value = getProperty(name);

        if (value != null) {
          properties.setProperty(name, value);
        }
        else {
          properties.remove(name);
        }

        properties.store(outputStream, generateFileHeader());
      }
      finally {
        Closer.close(outputStream);
      }
    }
    catch (IOException e) {
      UncheckedInterruptedException.ioException(e);
      throw new PersistenceException(
        "Error writing properties file '" + m_file.getPath() + '\'', e);
    }
  }

  public  GrinderProperties();
  public  GrinderProperties(File file);

}