How to zip files and folders in Java?
问题 Please have a look at the below code. public void startCompress(String path,String fileName,String outputLocation,int compressType,int filSize) throws Exception { System.out.println("Input Location: "+path); System.out.println("Output Location: "+outputLocation); System.out.println(compressType); byte[] bs=new byte[filSize]; System.out.println(filSize); FileOutputStream fos=new FileOutputStream(outputLocation+"/test.zip"); System.out.println(fos.toString()); ZipOutputStream zos=new