Home » struts-2.1.8.1-src » org.apache » struts2 » rest » handler » [javadoc | source]
org.apache.struts2.rest.handler
public interface: ContentTypeHandler [javadoc | source]

All Known Implementing Classes:
    XStreamHandler, JsonLibHandler, HtmlHandler, MultipartFormDataHandler, FormUrlEncodedHandler

Handles transferring content to and from objects for a specific content type
Method from org.apache.struts2.rest.handler.ContentTypeHandler Summary:
fromObject,   getContentType,   getExtension,   toObject
Method from org.apache.struts2.rest.handler.ContentTypeHandler Detail:
 public String fromObject(Object obj,
    String resultCode,
    Writer stream) throws IOException
    Writes content to the stream
 public String getContentType()
    Gets the content type for this handler
 public String getExtension()
    Gets the extension this handler supports
 public  void toObject(Reader in,
    Object target) throws IOException
    Populates an object using data from the input stream