Code example for FileWriter

0
	protected void open(String basePath)
	  throws IOException 
	{ 
		File f = new File(basePath + "-" + getTodayString());
		mPath = f.getAbsolutePath();
		mWriter = new BufferedWriter(new FileWriter(mPath), 2048);
 
		println("Opened log."); 
	} 
 
	private static String getTodayString()
	{ 
		SimpleDateFormat df = new SimpleDateFormat("yyyyMMdd-hhmmss");
		return df.format(new Date());
	} 
 
	public String getPath()
	{ 
		return mPath;
	}