| |
|
| java.lang.Object com.opensymphony.webwork.dispatcher.WebWorkResultSupport com.opensymphony.webwork.dispatcher.StreamResult
StreamResult | public class StreamResult extends WebWorkResultSupport (Code) | |
A custom Result type for send raw data (via an InputStream) directly to the
HttpServletResponse. Very useful for allowing users to download content.
This result type takes the following parameters:
- contentType - the stream mime-type as sent to the web browser
(default =
text/plain ).
- contentLength - the stream length in bytes (the browser displays a
progress bar).
- contentDispostion - the content disposition header value for
specifing the file name (default =
inline , values are typically
filename="document.pdf".
- inputName - the name of the InputStream property from the chained
action (default =
inputStream ).
- bufferSize - the size of the buffer to copy from input to output
(default =
1024 ).
Example:
<result name="success" type="stream">
<param name="contentType">image/jpeg</param>
<param name="inputName">imageStream</param>
<param name="contentDisposition">filename="document.pdf"</param>
<param name="bufferSize">1024</param>
</result>
author: mcrawford author: Rainer Hermanns author: tm_jee |
bufferSize | protected int bufferSize(Code) | | |
log | final protected static Log log(Code) | | |
getBufferSize | public int getBufferSize()(Code) | | Returns the bufferSize. |
getContentDisposition | public String getContentDisposition()(Code) | | Returns the Content-disposition header value. |
getContentLength | public String getContentLength()(Code) | | Returns the contentLength. |
getContentType | public String getContentType()(Code) | | Returns the contentType. |
getInputName | public String getInputName()(Code) | | Returns the inputName. |
setBufferSize | public void setBufferSize(int bufferSize)(Code) | | Parameters: bufferSize - The bufferSize to set. |
setContentDisposition | public void setContentDisposition(String contentDisposition)(Code) | | Parameters: contentDisposition - the Content-disposition header value to use. |
setContentLength | public void setContentLength(String contentLength)(Code) | | Parameters: contentLength - The contentLength to set. |
setContentType | public void setContentType(String contentType)(Code) | | Parameters: contentType - The contentType to set. |
setInputName | public void setInputName(String inputName)(Code) | | Parameters: inputName - The inputName to set. |
|
|
|