Home » zip » Page 2

Tag Archives: zip

Compress Objects example

With this example we are going to demonstrate how to compress and expand an Object. We have implemented the ObjectCompressionUtil Class, that extends the Serializable class and has a parameter that is the generic type of the serializable object to be compressed. The class consists of two methods. The compressObject(final T objectToCompress, final OutputStream outstream) takes the object to compress and ...

Read More »

Compress – Decompress files example

This is an example of how to zip and unzip a file. We have implemented the FileCompressionUtil class, that consists of four methods, that zip and unzip a file with or without a checksum. The first method zipFilesInPath(final String zipFileName, final String filePath) zips a file in a specific path. The method creates a ZipOutputStream, using a FileOutputStream, with the ...

Read More »