Class Zips
java.lang.Object
com.pnfsoftware.jeb.util.encoding.zip.Zips
Zip compression utility methods.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidCreate or overwrite a zip archive; add the specified entry to that archive.static voidCreate or overwrite a zip archive; add the specified entry to that archive.static voidCreate or overwrite a zip archive; add the specified input file to that archive.
-
Constructor Details
-
Zips
public Zips()
-
-
Method Details
-
zipFile
Create or overwrite a zip archive; add the specified input file to that archive. The input file will be added to archive root.- Parameters:
zipfile- zip output fileinputFile- input file- Throws:
IOException- if the archive cannot be written
-
zipBytes
Create or overwrite a zip archive; add the specified entry to that archive.- Parameters:
zipfile- zip output fileentryName- entry name inside the archivedata- entry bytes- Throws:
IOException- if the archive cannot be written
-
zipBytes
public static void zipBytes(File zipfile, String entryName, byte[] data, int offset, int length) throws IOException Create or overwrite a zip archive; add the specified entry to that archive.- Parameters:
zipfile- zip output fileentryName- entry name inside the archivedata- source bytesoffset- first source byte to writelength- number of bytes to write- Throws:
IOException- if the archive cannot be written
-