Package org.apache.struts2.rest.handler
Class AbstractContentTypeHandler
java.lang.Object
org.apache.struts2.rest.handler.AbstractContentTypeHandler
- All Implemented Interfaces:
ContentTypeHandler
- Direct Known Subclasses:
FormUrlEncodedHandler
,HtmlHandler
,JacksonJsonHandler
,JacksonXmlHandler
,JuneauXmlHandler
,MultipartFormDataHandler
,XStreamHandler
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.apache.struts2.rest.handler.ContentTypeHandler
fromObject, getContentType, getExtension, toObject
-
Constructor Details
-
AbstractContentTypeHandler
public AbstractContentTypeHandler()
-
-
Method Details
-
toObject
Description copied from interface:ContentTypeHandler
Populates an object using data from the input stream- Specified by:
toObject
in interfaceContentTypeHandler
- Parameters:
in
- The input stream, usually the body of the requesttarget
- The target, usually the action class- Throws:
IOException
- If unable to write to the output stream
-
fromObject
Description copied from interface:ContentTypeHandler
Writes content to the stream- Specified by:
fromObject
in interfaceContentTypeHandler
- Parameters:
obj
- The object to write to the stream, usually the Action classresultCode
- The original result codestream
- The output stream, usually the response- Returns:
- The new result code
- Throws:
IOException
- If unable to write to the output stream
-