Iterator it = detectorStateList.entrySet().iterator(); int i = 0; while (it.hasNext()) { Map.Entry entry = (Map.Entry) it.next(); props.put( "detector" + i, entry.getKey() + "|" + String.valueOf(((Boolean)entry.getValue()).booleanValue())); i++; }
	public void write() {		Properties props = new Properties();		for (int i = 0; i < recentProjectsList.size(); i++) {			String projectName = recentProjectsList.get(i);			String key = "recent" + i;			props.put(key,projectName);		}		File prefFile = new File( System.getProperty( "user.home" ), "Findbugs.prefs" );		BufferedOutputStream prefStream = null;		try {			prefStream = new BufferedOutputStream(new FileOutputStream(prefFile));			props.store(prefStream, "FindBugs User Preferences");			prefStream.flush();		} catch (Exception e) {			//Report? -- probably not		} finally {			try {				if (prefStream != null)					prefStream.close();			}			catch (IOException ioe) {}		}	}