Code example for FileWriter

Methods: append

0
  	return free;
	} 
 
	private void log(String num, String name, String body, long time) throws IOException
	{ 
		if(logFile == null) logFile = new FileWriter(smsFn(), true);
		if(num  == null) num  = "";
		if(name == null) name = "";
		body = body.replace("\r","").replace("\\",UNSLASH).replace("\n","\\n").replace(SEP_S, UNSEP);
		logFile.append(A.date(time) + SEP + name + SEP + num + SEP + body + '\n');
	} 
	 
	private void logClose() 
	{ 
    if(logFile == null) return;
  	try { 
  		logFile.flush();
  		logFile.close();
  	} catch(IOException e) {}
  	logFile = null;
	}