writer= new FileWriter(getStoreFile()); saveToStream(fgJavadocLocations, writer); } catch (IOException e) { throw createException(e, CorextMessages.getString("JavaDocLocations.error.writeFile"));
saveToStream(fgJavadocLocations, stream); byte[] bytes= stream.toByteArray(); String val; try { val= new String(bytes, "UTF-8"); } catch (UnsupportedEncodingException e) { val= new String(bytes); } PreferenceConstants.getPreferenceStore().setValue(PREF_JAVADOCLOCATIONS, val); JavaPlugin.getDefault().savePluginPreferences();
	private static synchronized void storeLocations() throws CoreException {		Writer writer= null;		try {			writer= new FileWriter(getStoreFile());			saveToStream(fgJavadocLocations, writer);		} catch (IOException e) {			throw createException(e, CorextMessages.getString("JavaDocLocations.error.writeFile")); //$NON-NLS-1$		} finally {			try {				if (writer != null)					writer.close();			} catch (IOException e) {				//	error closing reader: ignore			}		}	}