Class MultipartFormDataHandler

java.lang.Object
org.apache.struts2.rest.handler.AbstractContentTypeHandler
org.apache.struts2.rest.handler.MultipartFormDataHandler
All Implemented Interfaces:
ContentTypeHandler

public class MultipartFormDataHandler extends AbstractContentTypeHandler
Handles the default content type for requests that originate from a browser's HTML form with a file upload and multipart/from-data encoding content-type: multipart/form-data This handler is intended for requests only, not for responses
See Also:
  • Field Details

  • Constructor Details

    • MultipartFormDataHandler

      public MultipartFormDataHandler()
  • Method Details

    • fromObject

      public String fromObject(com.opensymphony.xwork2.ActionInvocation invocation, Object obj, String resultCode, Writer out) throws IOException
      Throws:
      IOException
    • toObject

      public void toObject(com.opensymphony.xwork2.ActionInvocation invocation, Reader in, Object target)
      No transformation is required as the framework handles this data
      Parameters:
      in - The input stream, usually the body of the request
      target - The target, usually the action class
    • getExtension

      public String getExtension()
      Description copied from interface: ContentTypeHandler
      Gets the extension this handler supports
      Returns:
      The extension is not used by this handler
    • getContentType

      public String getContentType()
      Description copied from interface: ContentTypeHandler
      Gets the content type for this handler
      Returns:
      The mime type