Package org.apache.struts2.rest.handler
Class MultipartFormDataHandler
java.lang.Object
org.apache.struts2.rest.handler.MultipartFormDataHandler
- All Implemented Interfaces:
- ContentTypeHandler
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
- 
Field SummaryFields
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionfromObject(ActionInvocation invocation, Object obj, String resultCode, Writer out) Gets the content type for this handlerGets the extension this handler supportsvoidtoObject(ActionInvocation invocation, Reader in, Object target) No transformation is required as the framework handles this data
- 
Field Details- 
CONTENT_TYPE- See Also:
 
 
- 
- 
Constructor Details- 
MultipartFormDataHandlerpublic MultipartFormDataHandler()
 
- 
- 
Method Details- 
fromObjectpublic String fromObject(ActionInvocation invocation, Object obj, String resultCode, Writer out) throws IOException - Specified by:
- fromObjectin interface- ContentTypeHandler
- Throws:
- IOException
 
- 
toObjectNo transformation is required as the framework handles this data- Specified by:
- toObjectin interface- ContentTypeHandler
- Parameters:
- in- The input stream, usually the body of the request
- target- The target, usually the action class
 
- 
getExtensionDescription copied from interface:ContentTypeHandlerGets the extension this handler supports- Specified by:
- getExtensionin interface- ContentTypeHandler
- Returns:
- The extension is not used by this handler
 
- 
getContentTypeDescription copied from interface:ContentTypeHandlerGets the content type for this handler- Specified by:
- getContentTypein interface- ContentTypeHandler
- Returns:
- The mime type
 
 
-