public static class DownloadAction.ResourceStreamInfo extends Object implements DownloadAction.StreamInfo
StreamInfo
interface
which simplifies the downloading of a web application resource.Constructor and Description |
---|
ResourceStreamInfo(String contentType,
javax.servlet.ServletContext context,
String path)
Constructs an instance of this class, based on the supplied
parameters.
|
Modifier and Type | Method and Description |
---|---|
String |
getContentType()
Returns the content type of the stream to be downloaded.
|
InputStream |
getInputStream()
Returns an input stream on the resource to be downloaded.
|
public ResourceStreamInfo(String contentType, javax.servlet.ServletContext context, String path)
contentType
- The content type of the file.context
- The servlet context for the resource.path
- The path to the resource to be downloaded.public String getContentType()
getContentType
in interface DownloadAction.StreamInfo
public InputStream getInputStream() throws IOException
DownloadAction
.getInputStream
in interface DownloadAction.StreamInfo
IOException
- if an error occursCopyright © 2000–2017 Apache Software Foundation. All rights reserved.