public final class DownloadUtils extends Object
Modifier and Type | Method and Description |
---|---|
static void |
setDownloadResponseHeaders(String fileName,
com.google.common.net.MediaType mimeType,
int length,
boolean forceDownload,
javax.servlet.http.HttpServletResponse response)
Set a download response into the given response instance.
|
public static void setDownloadResponseHeaders(String fileName, com.google.common.net.MediaType mimeType, int length, boolean forceDownload, javax.servlet.http.HttpServletResponse response)
fileName
- the download file namemimeType
- the download file mime typelength
- the content lengthforceDownload
- true
to force the download by sending an attachment instead of form dataresponse
- the response instance to be setCopyright © 2010 - 2017 edorasware ag. All Rights Reserved.