public class

ResourceDownloadUtils

extends Object
java.lang.Object
   ↳ com.atlassian.plugin.servlet.ResourceDownloadUtils

Summary

Public Constructors
ResourceDownloadUtils()
Public Methods
static void addCachingHeaders(HttpServletResponse httpServletResponse, String... cacheControls)
Set 'expire' headers to cache for one year.
@Deprecated static void addCachingHeaders(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse)
static void addPrivateCachingHeaders(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse)
Sets caching headers with private cache control.
static void addPublicCachingHeaders(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse)
Sets caching headers with public cache control.
@Deprecated static void serveFileImpl(HttpServletResponse httpServletResponse, InputStream in)
This method is deprecated. Since 2.0. Use copy(InputStream, OutputStream) instead. The method calling this should be responsible for closing streams and flushing if necessary.
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public ResourceDownloadUtils ()

Public Methods

public static void addCachingHeaders (HttpServletResponse httpServletResponse, String... cacheControls)

Set 'expire' headers to cache for one year. Also adds the additional cache control values passed in. Note, this method resets the cache control headers if set previously.

@Deprecated public static void addCachingHeaders (HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse)

This method is deprecated.
Please use addPublicCachingHeaders(HttpServletRequest, HttpServletResponse) or addPrivateCachingHeaders(HttpServletRequest, HttpServletResponse) instead.

Set 'expire' headers to cache for one year, with public caching turned on.

public static void addPrivateCachingHeaders (HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse)

Sets caching headers with private cache control. Applications should call this method from urlrewrite.xml to decorate urls like /sp/{build num}/.../_/resourceurl.

public static void addPublicCachingHeaders (HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse)

Sets caching headers with public cache control. Applications should call this method from urlrewrite.xml to decorate urls like /s/{build num}/.../_/resourceurl.

@Deprecated public static void serveFileImpl (HttpServletResponse httpServletResponse, InputStream in)

This method is deprecated.
Since 2.0. Use copy(InputStream, OutputStream) instead. The method calling this should be responsible for closing streams and flushing if necessary.

Throws
IOException