Code example for FileWriter

Methods: close, flush, write

0
		Writer outWriter = null;
		String ccConfigPath = BoincManagerApplication.getBoincDirectory(context)+
				"/cc_config.xml"; 
		 
		try { 
			outWriter = new FileWriter(ccConfigPath);
			 
			outWriter.write(content);
			outWriter.flush();
		} finally { 
			if (outWriter != null)
				outWriter.close();
		} 
	} 
	 
	public static void removeCcConfigFile(Context context) {
		String ccConfigPath = BoincManagerApplication.getBoincDirectory(context)+
				"/cc_config.xml"; 
		 
		File ccConfigFile = new File(ccConfigPath);
		ccConfigFile.delete();