Save This Page
Home » struts-2.0.11.2-src » org.apache » struts2 » dispatcher » [javadoc | source]
org.apache.struts2.dispatcher
public class: StreamResult [javadoc | source]
java.lang.Object
   org.apache.struts2.dispatcher.StrutsResultSupport
      org.apache.struts2.dispatcher.StreamResult

All Implemented Interfaces:
    com.opensymphony.xwork2.Result, StrutsStatics

A custom Result type for sending raw data (via an InputStream) directly to the HttpServletResponse. Very useful for allowing users to download content.

This result type takes the following parameters:

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>
Field Summary
protected static final  Log log     
public static final  String DEFAULT_PARAM     
protected  String contentType     
protected  String contentLength     
protected  String contentDisposition     
protected  String inputName     
protected  InputStream inputStream     
protected  int bufferSize     
Fields inherited from org.apache.struts2.dispatcher.StrutsResultSupport:
DEFAULT_PARAM
Constructor:
 public StreamResult() 
 public StreamResult(InputStream in) 
Method from org.apache.struts2.dispatcher.StreamResult Summary:
doExecute,   getBufferSize,   getContentDisposition,   getContentLength,   getContentType,   getInputName,   setBufferSize,   setContentDisposition,   setContentLength,   setContentType,   setInputName
Methods from org.apache.struts2.dispatcher.StrutsResultSupport:
conditionalParse,   doExecute,   execute,   getLastFinalLocation,   setEncode,   setLocation,   setParse
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.apache.struts2.dispatcher.StreamResult Detail:
 protected  void doExecute(String finalLocation,
    ActionInvocation invocation) throws Exception 
 public int getBufferSize() 
 public String getContentDisposition() 
 public String getContentLength() 
 public String getContentType() 
 public String getInputName() 
 public  void setBufferSize(int bufferSize) 
 public  void setContentDisposition(String contentDisposition) 
 public  void setContentLength(String contentLength) 
 public  void setContentType(String contentType) 
 public  void setInputName(String inputName)