public static void writeToFile(String fileName,String content) throws IOException {
  FileWriter fileWriter=null;
  try {
    fileWriter=new FileWriter(fileName);
    fileWriter.write(content);
  }
  finally {
    closeIfNotNull(fileWriter);
  }
}

public static void writeToFile ( String fileName , String content ) throws IOException { FileWriter fileWriter = null ; try { fileWriter = new FileWriter ( fileName ) ; fileWriter . write ( content ) ; } finally { closeIfNotNull ( fileWriter ) ; } }
writes the provided content to a file with the provided name .
