public static class DownloadAction.ResourceStreamInfo extends java.lang.Object implements DownloadAction.StreamInfo
StreamInfo interface
which simplifies the downloading of a web application resource.| Constructor and Description |
|---|
ResourceStreamInfo(java.lang.String contentType,
javax.servlet.ServletContext context,
java.lang.String path)
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 resource to be downloaded.
|
public ResourceStreamInfo(java.lang.String contentType,
javax.servlet.ServletContext context,
java.lang.String path)
contentType - The content type of the file.context - The servlet context for the resource.path - The path to the resource 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–2024 Apache Software Foundation. All rights reserved.