1 package org.jahia.clipbuilder.html.util; 2 3 import java.io.*; 4 5 10 public class FileUtilities { 11 12 18 public static void writeIntoFile(String fileName, String html) { 19 File f = new File(fileName); 20 try { 21 f.createNewFile(); 22 java.io.FileWriter fWriter = new FileWriter(f); 23 fWriter.write(html); 24 } 25 catch (IOException ex) { 26 ex.printStackTrace(); 27 } 28 } 29 30 31 37 public static boolean deleteFile(String fileName) { 38 File f = new File(fileName); 39 return f.delete(); 40 } 41 } 42 | Popular Tags |