zipFile

fun zipFile(file: File, targetStream: OutputStream, includeSelf: Boolean)

Compresses a file into a zip file

Author

Arnau Mora

Since

20210318

Parameters

file

The source file

targetStream

The target file's output stream

Throws

If the entry name is null

If the entry name is longer than 0xFFFF byte

If a security manager exists and its SecurityManager.checkRead(String) method denies read access to the file

If a ZIP format error has occurred

If an I/O error has occurre