Can anyone explain how I would use the java.util.zip class to zip a file I have. I would like to zip the file after I write it to the directory.
Here is some sample code I have to write a file:
File file = new File(webPath+filename);
FileWriter fileWrite = new FileWriter(file);
String outputString = new String();
outputString += "Text here";
outputString += "and here";
fileWrite.write(outputString);
fileWrite.flush();
fileWrite.close();
Here is some sample code I have to write a file:
File file = new File(webPath+filename);
FileWriter fileWrite = new FileWriter(file);
String outputString = new String();
outputString += "Text here";
outputString += "and here";
fileWrite.write(outputString);
fileWrite.flush();
fileWrite.close();