Compress Folder into zip file using Java

Example of compress a folder recursively into a zip file.

 

Example of output.

 

read more

Create Zip archive using Java

An example of compress file into zip file in java.

 Reference

1.http://docs.oracle.com/javase/6/docs/api/java/util/zip/ZipOutputStream.html

read more

Write file with FileOutputStream

 

Reference
http://docs.oracle.com/javase/6/docs/api/java/io/FileOutputStream.html#write(byte[])

read more

Delete File

 

 

Reference
http://docs.oracle.com/javase/6/docs/api/java/io/File.html#delete()

read more

Create New File

 

Reference
http://docs.oracle.com/javase/6/docs/api/java/io/File.html#createNewFile()

read more