Lots of time
we have a requirement in a project where we need to zip multiple files together and
use it for some further testing like upload.
From java.util
package java.util.zip.ZipOutputStream can be used to compress a file into
ZIP format. Since a zip file can contain multiple entries, ZipOutputStream
uses java.util.zip.ZipEntry to represent a zip file entry.
In this example scenario I will zip two files placed in my local at path D:\SampleFile