Zip file created on server and download that zip, using java
问题 I have the below code got from mkyong, to zip files on local. But, my requirement is to zip files on server and need to download that. Could any one help. code wrote to zipFiles: public void zipFiles(File contentFile, File navFile) { byte[] buffer = new byte[1024]; try{ // i dont have idea on what to give here in fileoutputstream FileOutputStream fos = new FileOutputStream("C:\\MyFile.zip"); ZipOutputStream zos = new ZipOutputStream(fos); ZipEntry ze= new ZipEntry(contentFile.toString()); zos