Code example for BufferedWriter

Methods: close, write

0
		//Log.e("BookCatalogue", error); 
		 
		try { 
			// RELEASE Remove Log.e! Replace with ACRA? 
			Log.e("BC Logger", error);
			BufferedWriter out = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(StorageUtils.getErrorLog()), "utf8"), 8192);
			out.write(error);
			out.close();
		} catch (Exception e1) {
			// do nothing - we can't log an error in the error logger. (and we don't want to FC the app) 
		} 
	} 
 
	/** 
	 * Clear the error log each time the app is started; preserve previous if non-empty 
	 */ 
	public static void clearLog() { 
		try { 
			try {  
				File orig = new File(StorageUtils.getErrorLog());
				if (orig.exists() && orig.length() > 0) {