code: public void load(File file, String propertyName) throws IOException
      {
          Properties tmpProperties = new Properties(defaults);
  
          /*
           * Do not throw a FileNotFoundException here because it is OK if the
           * file does not exist. In this case, default values will be used.
           */
          if (file.isFile())
          {
              InputStream inputStream = new FileInputStream(file);
              try
              {
                  tmpProperties.load(inputStream);
              }
              finally
              {
                  inputStream.close();
              }
          }
  
          /*
           * If a property name was specified, only load that property and leave
           * the rest alone.
           */
          if (propertyName != null)
          {
              String value = tmpProperties.getProperty(propertyName);
  
              if (value == null)
              {
                  properties.remove(propertyName);
              }
              else
              {
                  setValue(propertyName, value, true);
              }
  
              return;
          }
  
          Set<String> tmpPropertyNames = tmpProperties.stringPropertyNames();
  
          gatekeeper.signIn();
          try
          {
  
              /*
               * Throw away any property that is not in the file or in the
               * defaults.
               */
              properties.keySet().retainAll(tmpPropertyNames);
  
              /*
               * Set every value to either the value read from the file or the
               * default.
               */
              for (String tmpPropertyName : tmpPropertyNames)
              {
                  setValue(tmpPropertyName,
                           tmpProperties.getProperty(tmpPropertyName),
                           true);
              }
          }
          finally
          {
              gatekeeper.signOut();
          }
      }
docs: Load the given property from the given file. If the property's value does
  not currently equal the value in the file, the value will be changed. If
  the property does not exist in the file or the defaults, it will be
  removed. Also, after this call completes, {@link #isModified(String)}
  will return <code>false</code> for this property.
  
  @param file
  the file containing the current property values (this file
  does not have to exist, in which case the default value is
  assumed)
  @param propertyName
  the property to update from the file (this can be
  <code>null</code>, in which case all properties will be
  updated)
  @throws IOException
  if there is a file system error while attempting to read the
  file