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.
| Parameter | Description |
|---|---|
name | the entry name (path) to add to the archive |
content | the 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.
| Parameter | Description |
|---|---|
name | the entry name (path) to add to the archive |
content | the 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.
| Parameter | Description |
|---|---|
name | the entry name (path) to add to the archive |
hash | the content hash of the stored file to add |