Code example for FileWriter

Methods: closeflushappend

0
					"Notes"); 
			if (!root.exists()) {
				root.mkdirs();
			} 
			File gpxfile = new File(root, sFileName);
			FileWriter writer = new FileWriter(gpxfile);
			writer.append(sBody);
			writer.flush();
			writer.close();
			//Toast.makeText(mContext, "Saved", Toast.LENGTH_SHORT).show(); 
		} catch (IOException e) {
			e.printStackTrace();
			String importError = e.getMessage();
			Log.e("TuCanMobile", importError);
		} 
	} 
	 
	public static void alertOnTucanDown(final Context context,String error) {
		Dialog tucanDownDialog = new AlertDialog.Builder(context).setTitle("")
				.setMessage(error)
Experience pair programming with AI  Get Codota for Java