Code example for BufferedWriter

0
			File morgDir = new File(root, "mobileorg");
			morgDir.mkdir();
			if (morgDir.canWrite()) {
				File orgFileCard = new File(morgDir, fileName);
				FileWriter orgFWriter = new FileWriter(orgFileCard, append);
				writer = new BufferedWriter(orgFWriter);
			} 
		} 
 
		return writer;
	} 
 
	public File getFile() {
		String storageMode = getStorageMode();
		if (storageMode.equals("internal") || storageMode.equals("")) {
			File morgFile = new File("/data/data/com.matburt.mobileorg/files",
					fileName);
			return morgFile;
		} else if (storageMode.equals("sdcard")) {
			File root = Environment.getExternalStorageDirectory();
			File morgDir = new File(root, "mobileorg");