org.apache.struts.actions
public static class DownloadAction.ResourceStreamInfo extends Object implements DownloadAction.StreamInfo
StreamInfo
interface which
simplifies the downloading of a web application resource.
Field Summary | |
---|---|
String | contentType
The content type for this stream. |
ServletContext | context
The servlet context for the resource to be downloaded. |
String | path
The path to the resource to be downloaded. |
Constructor Summary | |
---|---|
ResourceStreamInfo(String contentType, ServletContext context, String path)
Constructs an instance of this class, based on the supplied
parameters.
|
Method Summary | |
---|---|
String | getContentType()
Returns the content type of the stream to be downloaded.
|
InputStream | getInputStream()
Returns an input stream on the resource to be downloaded. |
Parameters: contentType The content type of the file. context The servlet context for the resource. path The path to the resource to be downloaded.
Returns: The content type of the stream.
DownloadAction
.
Returns: The input stream for the resource to be downloaded.