public class ImageDownloader extends Object
Constructor and Description |
---|
ImageDownloader() |
Modifier and Type | Method and Description |
---|---|
static void |
addCachingHeaders(javax.servlet.http.HttpServletRequest httpServletRequest,
javax.servlet.http.HttpServletResponse httpServletResponse)
Set 'expire' headers to cache for one year.
|
static void |
doDownload(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse resp,
String filename,
boolean shouldClose)
Sends an image to the ServletResponse output stream.
|
public static void doDownload(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp, String filename, boolean shouldClose) throws IOException
req
- The requestresp
- The responsefilename
- The name of the image you want to download.shouldClose
- Whether the output stream should be closed or notIOException
public static void addCachingHeaders(javax.servlet.http.HttpServletRequest httpServletRequest, javax.servlet.http.HttpServletResponse httpServletResponse)
Copyright © 2021 Atlassian Software Systems Pty Ltd. All rights reserved.