Package org.apache.struts2.rest.handler

# Interface ContentTypeHandler

All Known Implementing Classes:
  `AbstractContentTypeHandler`, `FormUrlEncodedHandler`, `HtmlHandler`, `JacksonJsonHandler`, `JacksonXmlHandler`, `JuneauXmlHandler`, `MultipartFormDataHandler`, `XStreamHandler`

public interface ContentTypeHandler
Handles transferring content to and from objects for a specific content type

- ## Method Summary

  Modifier and Type
  Method
  Description
  `String`
  `fromObject(ActionInvocation invocation, Object obj, String resultCode, Writer stream)`
  `String`
  `getContentType()`
  Gets the content type for this handler
  `String`
  `getExtension()`
  Gets the extension this handler supports
  `void`
  `toObject(ActionInvocation invocation, Reader in, Object target)`

- ## Method Details

  - ### toObject

    void toObject(ActionInvocation invocation, Reader in, Object target) throws IOException
    Throws:
      `IOException`

  - ### fromObject

    String fromObject(ActionInvocation invocation, Object obj, String resultCode, Writer stream) throws IOException
    Throws:
      `IOException`

  - ### getContentType

    String getContentType()
    Gets the content type for this handler
    Returns:
      The mime type

  - ### getExtension

    String getExtension()
    Gets the extension this handler supports
    Returns:
      The extension