docs: public void write(@WillClose OutputStream out) throws IOException {
  
          Properties props = new SortedProperties();
  
          for (int i = 0; i < recentProjectsList.size(); i++) {
              String projectName = recentProjectsList.get(i);
              String key = "recent" + i;
              props.put(key, projectName);
          }
  
          Iterator<Entry<String, Boolean>> it = detectorEnablementMap.entrySet().iterator();
          while (it.hasNext()) {
              Entry<String, Boolean> entry = it.next();
              props.put("detector" + entry.getKey(), entry.getKey() + BOOL_SEPARATOR + String.valueOf(entry.getValue().booleanValue()));
          }
  
          // Save ProjectFilterSettings
          props.put(FILTER_SETTINGS_KEY, filterSettings.toEncodedString());
          props.put(FILTER_SETTINGS2_KEY, filterSettings.hiddenToEncodedString());
  
          // Backwards-compatibility: save minimum warning priority as integer.
          // This will allow the properties file to work with older versions
          // of FindBugs.
          props.put(DETECTOR_THRESHOLD_KEY, String.valueOf(filterSettings.getMinPriorityAsInt()));
          props.put(RUN_AT_FULL_BUILD, String.valueOf(runAtFullBuild));
          props.setProperty(EFFORT_KEY, effort);
          writeProperties(props, KEY_INCLUDE_FILTER, includeFilterFiles);
          writeProperties(props, KEY_EXCLUDE_FILTER, excludeFilterFiles);
          writeProperties(props, KEY_EXCLUDE_BUGS, excludeBugsFiles);
          writeProperties(props, KEY_PLUGIN, customPlugins);
  
          OutputStream prefStream = null;
          try {
              prefStream = new BufferedOutputStream(out);
              props.store(prefStream, "SpotBugs User Preferences");
              prefStream.flush();
          } finally {
              try {
                  if (prefStream != null) {
                      prefStream.close();
                  }
              } catch (IOException ioe) {
              }
          }
      }