Streams a file that is stored as a content-addressed hash split across the blob store, reassembling it from its fanout of chunk hashes. Created via ViewsBuilder.fileView(...) from server-side JS. By default it reads from the server-wide blob and hash stores; when constructed with isPerTenant true it reads from the current tenant's own stores instead.

Group: Views

Implements: View, Serializable


Properties

PropertyReturnsDescription
contentTypeStringThe content type supplied at construction, sent as the response's content type.
hashStringThe content hash this view was constructed with, used to look up the file's chunk fanout.

Methods

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

Returns: void

Reassembles the file's chunks from the blob store and writes them to the response, restricted to the requested byte range if any.

ParameterDescription
pagethe resource the view is being rendered for, not used by this view
outthe stream the file's bytes are written to
rangeif given, only the bytes within this range are written
paramsrequest parameters, not used by this view
contentTypenot used by this view; getContentType() supplies the response content type

getHash()

Returns: String

The content hash this view was constructed with, used to look up the file's chunk fanout.

getContentType()

Returns: String

The content type supplied at construction, sent as the response's content type.

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