Package org.apache.struts.extras.actions
Class DownloadAction.ResourceStreamInfo
java.lang.Object
org.apache.struts.extras.actions.DownloadAction.ResourceStreamInfo
- All Implemented Interfaces:
 DownloadAction.StreamInfo
- Enclosing class:
 DownloadAction
public static class DownloadAction.ResourceStreamInfo
extends Object
implements DownloadAction.StreamInfo
A concrete implementation of the 
StreamInfo interface
 which simplifies the downloading of a web application resource.- 
Constructor Summary
ConstructorsConstructorDescriptionResourceStreamInfo(String contentType, ServletContext context, String path) Constructs an instance of this class, based on the supplied parameters. - 
Method Summary
Modifier and TypeMethodDescriptionReturns the content type of the stream to be downloaded.Returns an input stream on the resource to be downloaded. 
- 
Constructor Details
- 
ResourceStreamInfo
Constructs an instance of this class, based on the supplied parameters.- Parameters:
 contentType- The content type of the file.context- The servlet context for the resource.path- The path to the resource to be downloaded.
 
 - 
 - 
Method Details
- 
getContentType
Returns the content type of the stream to be downloaded.- Specified by:
 getContentTypein interfaceDownloadAction.StreamInfo- Returns:
 - The content type of the stream.
 
 - 
getInputStream
Returns an input stream on the resource to be downloaded. This stream will be closed by theDownloadAction.- Specified by:
 getInputStreamin interfaceDownloadAction.StreamInfo- Returns:
 - The input stream for the resource to be downloaded.
 - Throws:
 IOException- if an error occurs
 
 -