|Modifier and Type||Method and Description|
Returns a URI for downloading this binary directly from the storage location.
@Nullable @Nullable URI getURI(BinaryDownloadOptions downloadOptions) throws RepositoryException
downloadOptions parameter, some response headers of the
download request can be overwritten, if supported by the storage provider.
This is necessary to pass information that is only stored in the JCR in
application specific structures, and not reliably available in the binary
BinaryDownloadOptions supports, but is not limited to:
Content-Type media type: typically available in a
Content-Type charset: for media types defining a "charset", typically available in a
Content-Disposition filename: download file name, typically taken from a JCR node name in the parent hierarchy, such as the nt:file node name
Content-Disposition type: whether to show the content inline of a page (inline) or enforce a download/save as (attachment)
BinaryDownloadOptions.DEFAULTwill use mostly empty defaults, relying on the storage provider attributes for this binary (that might be empty or different from the information in the JCR).
BinaryDownloadOptionsinstance which is used to request specific options on the binary to be downloaded.
BinaryDownloadOptions.DEFAULTshould be used if the caller wishes to accept the storage provider's default behavior.
nullif the binary cannot be downloaded directly or if the underlying implementation does not support this capability.
RepositoryException- if an error occurs trying to locate the binary.
Copyright © 2004–2020 The Apache Software Foundation. All rights reserved.