public static class DownloadAction.FileStreamInfo extends java.lang.Object implements DownloadAction.StreamInfo
StreamInfo interface
which simplifies the downloading of a file from the disk.| Constructor and Description |
|---|
FileStreamInfo(java.lang.String contentType,
java.io.File file)
Constructs an instance of this class, based on the supplied
parameters.
|
| Modifier and Type | Method and Description |
|---|---|
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.
|
public FileStreamInfo(java.lang.String contentType,
java.io.File file)
contentType - The content type of the file.file - The file to be downloaded.public java.lang.String getContentType()
getContentType in interface DownloadAction.StreamInfopublic java.io.InputStream getInputStream()
throws java.io.IOException
DownloadAction.getInputStream in interface DownloadAction.StreamInfojava.io.IOException - if an error occursCopyright © 2000–2025 Apache Software Foundation. All rights reserved.