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
| Property | Returns | Description |
|---|---|---|
| contentType | String | The content type supplied at construction, sent as the response's content type. |
| hash | String | The 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.
| Parameter | Description |
|---|---|
page | the resource the view is being rendered for, not used by this view |
out | the stream the file's bytes are written to |
range | if given, only the bytes within this range are written |
params | request parameters, not used by this view |
contentType | not 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.