Streams a zip archive to the response, built on the fly by a content provider callback. Created via a content-provider function that is invoked with a ZipViewHelper once rendering starts; the callback adds entries to the archive through the helper (from a byte array, an input stream, or a stored content hash) as the zip is streamed out.

Group: Views

Implements: View


Properties

PropertyReturnsDescription
contentTypeStringThe content type sent with the response, always "application/zip".

Methods

render(CommonResource page, OutputStream out, Range range, Map<String,String> params, String contentType)

Returns: void

Opens a zip stream over the response, invokes the content provider with a helper to add entries, then finishes the archive.

ParameterDescription
pagethe resource the view is being rendered for, not used by this view
outthe stream the zip archive is written to
rangenot used by this view; the full archive is always written
paramsrequest parameters, not used by this view
contentTypenot used by this view; getContentType() supplies the response content type

getContentType()

Returns: String

The content type sent with the response, always "application/zip".

To get full access to the Kademi Hub existing customers can login here, or new customers can register here.