public class EmptyDownloadableResource extends Object
| Modifier and Type | Field and Description |
|---|---|
protected String |
extraPath |
protected Plugin |
plugin |
protected ResourceLocation |
resourceLocation |
| Constructor and Description |
|---|
EmptyDownloadableResource(Plugin plugin,
ResourceLocation resourceLocation) |
| Modifier and Type | Method and Description |
|---|---|
String |
getContentType()
Returns the content type for the resource.
|
protected String |
getLocation()
This is called to return the location of the resource that this object
represents.
|
protected InputStream |
getResourceAsStream(String resourceLocation)
Returns an
InputStream to stream the resource from based on
resource name. |
boolean |
isResourceModified(javax.servlet.http.HttpServletRequest httpServletRequest,
javax.servlet.http.HttpServletResponse httpServletResponse)
Returns true if the plugin resource has been modified.
|
void |
serveResource(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Writes the resource content out into the response.
|
void |
streamResource(OutputStream out)
Write the resource to the supplied OutputStream.
|
String |
toString() |
protected final Plugin plugin
protected final String extraPath
protected final ResourceLocation resourceLocation
public EmptyDownloadableResource(Plugin plugin, ResourceLocation resourceLocation)
plugin - used to find last modified date and plugin keyresourceLocation - used to get content type for the resourceprotected InputStream getResourceAsStream(String resourceLocation)
InputStream to stream the resource from based on
resource name.resourceLocation - the location of the resource to try and loadpublic void serveResource(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws DownloadException
DownloadableResourceserveResource in interface DownloadableResourceDownloadException - if there were errors writing to the response.public void streamResource(OutputStream out) throws DownloadException
DownloadableResourcestreamResource in interface DownloadableResourceout - the stream to write toDownloadException - if there were errors writing to the response. Since 2.3.public boolean isResourceModified(javax.servlet.http.HttpServletRequest httpServletRequest,
javax.servlet.http.HttpServletResponse httpServletResponse)
DownloadableResourceisResourceModified in interface DownloadableResourcepublic String getContentType()
DownloadableResourcegetContentType in interface DownloadableResourceprotected String getLocation()
Copyright © 2019 Atlassian. All rights reserved.