Code example for FileWriter

Methods: flushwrite

0
	{ 
	  if(null!=writer)
	  { 
		  try { 
		   System.out.println(log);
			writer.write(log);
			writer.write("\r\n");
			writer.flush();
		} catch (IOException e) {
			// TODO Auto-generated catch block 
			e.printStackTrace();
		} 
		  
	  } 
		   
	} 
} 
Connect your IDE to all the code out there  Get Codota for Java