Apache Struts API Documentation: Class DownloadAction.FileStreamInfo
From Apache Struts API
|
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
org.apache.struts.actions Class DownloadAction.FileStreamInfo
java.lang.Object | +--org.apache.struts.actions.DownloadAction.FileStreamInfo
- All Implemented Interfaces:
- DownloadAction.StreamInfo
- Enclosing class:
- DownloadAction
- public static class DownloadAction.FileStreamInfo
- extends java.lang.Object
- implements DownloadAction.StreamInfo
A concrete implementation of the StreamInfo interface which
simplifies the downloading of a file from the disk.
| Field Summary | |
private java.lang.String |
contentType
The content type for this stream. |
private java.io.File |
file
The file to be downloaded. |
| Constructor Summary | |
DownloadAction.FileStreamInfo(java.lang.String contentType,
java.io.File file)
Constructs an instance of this class, based on the supplied parameters. |
|
| Method Summary | |
java.lang.String |
getContentType()
Returns the content type of the stream to be downloaded. |
java.io.InputStream |
getInputStream()
Returns an input stream on the file to be downloaded. |
| Methods inherited from class java.lang.Object |
|
| Field Detail |
contentType
private java.lang.String contentType
- The content type for this stream.
file
private java.io.File file
- The file to be downloaded.
| Constructor Detail |
DownloadAction.FileStreamInfo
public DownloadAction.FileStreamInfo(java.lang.String contentType,
java.io.File file)
- Constructs an instance of this class, based on the supplied parameters.
- Parameters:
contentType- The content type of the file.file- The file to be downloaded.
| Method Detail |
getContentType
public java.lang.String getContentType()
- Returns the content type of the stream to be downloaded.
- Specified by:
getContentTypein interfaceDownloadAction.StreamInfo
- Returns:
- The content type of the stream.
getInputStream
public java.io.InputStream getInputStream()
throws java.io.IOException
- Returns an input stream on the file to be downloaded. This stream
will be closed by the
DownloadAction. - Specified by:
getInputStreamin interfaceDownloadAction.StreamInfo
- Returns:
- The input stream for the file to be downloaded.
|
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
Copyright © 2000-2005 - The Apache Software Foundation