Java.Util.Zip.ZipOutputStream Class
Used to write (compress) data into zip files.

See Also: ZipOutputStream Members

Syntax

[Android.Runtime.Register("java/util/zip/ZipOutputStream", DoNotGenerateAcw=true)]
public class ZipOutputStream : DeflaterOutputStream

Remarks

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.

Example

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 

[Android Documentation]

Requirements

Namespace: Java.Util.Zip
Assembly: Mono.Android (in Mono.Android.dll)
Assembly Versions: 0.0.0.0
Since: Added in API level 1