|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.struts.actions.DownloadAction.FileStreamInfo
public static class DownloadAction.FileStreamInfo
A concrete implementation of the StreamInfo
interface
which simplifies the downloading of a file from the disk.
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 |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DownloadAction.FileStreamInfo(java.lang.String contentType, java.io.File file)
contentType
- The content type of the file.file
- The file to be downloaded.Method Detail |
---|
public java.lang.String getContentType()
getContentType
in interface DownloadAction.StreamInfo
public java.io.InputStream getInputStream() throws java.io.IOException
DownloadAction
.
getInputStream
in interface DownloadAction.StreamInfo
java.io.IOException
- if an error occurs
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |