See Also: ZipOutputStream Members
Used to write (compress) data into zip files.
ZipOutputStream is used to write Java.Util.Zip.ZipEntrys to the underlying stream. Output from ZipOutputStream can be read using Java.Util.Zip.ZipFile or Java.Util.Zip.ZipInputStream.
While DeflaterOutputStream can write compressed zip file entries, this extension can write uncompressed entries as well. Use ZipEntry.Method or ZipOutputStream.SetMethod(int) with the ZipEntry.Stored flag.
Using ZipOutputStream is a little more complicated than Java.Util.Zip.GZIPOutputStream because zip files are containers that can contain multiple files. This code creates a zip file containing several files, similar to the zip(1) utility.
java Example
OutputStream os = ... ZipOutputStream zos = new ZipOutputStream(new BufferedOutputStream(os)); try { for (int i = 0; i