Passed to a ZipView's content provider callback to add entries to the archive currently being streamed. Not constructed directly by app code; ZipView creates one and hands it to the content provider when rendering starts. Entries can be added from a byte array, an input stream, or looked up by a stored content hash.

Group: Views


Methods

add(String name, InputStream content)

Returns: void

Adds a zip entry with the given name, copying its bytes from the given input stream. The stream is closed after copying.

ParameterDescription
namethe entry name (path) to add to the archive
contentthe stream to copy the entry's bytes from

add(String name, byte[] content)

Returns: void

Adds a zip entry with the given name and byte content.

ParameterDescription
namethe entry name (path) to add to the archive
contentthe entry's bytes

addFileHash(String name, String hash)

Returns: void

Adds a zip entry with the given name, whose content is reassembled from a stored file's content hash. Does nothing if the hash has no chunk fanout in the hash store.

ParameterDescription
namethe entry name (path) to add to the archive
hashthe content hash of the stored file to add
To get full access to the Kademi Hub existing customers can login here, or new customers can register here.