Package com.emc.documentum.rest.wire.json

# Class AnnotatedJsonMessageWriter

java.lang.Object
com.emc.documentum.rest.wire.RestBindingConfigAware
com.emc.documentum.rest.wire.json.AnnotatedJsonMessageWriter

All Implemented Interfaces:
  `StreamingMessageWriter`

public class AnnotatedJsonMessageWriter extends RestBindingConfigAware implements StreamingMessageWriter
An implementation of `StreamingMessageWriter` which writes the JSON message from the annotated model instance.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `AnnotatedJsonMessageWriter()`
  Default constructor.
  `AnnotatedJsonMessageWriter(com.emc.documentum.rest.config.BindingConfig bindingConfig)`
  Constructor with a custom binding configuration.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `write(Object t, OutputStream outputStream)`
  Write the model to message output stream.
  `void`
  `write(Object t, OutputStream outputStream, org.springframework.http.MediaType contentType)`
  Write the model to message output stream

  ### Methods inherited from class com.emc.documentum.rest.wire.RestBindingConfigAware

  `getBindingConfig`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### AnnotatedJsonMessageWriter

    public AnnotatedJsonMessageWriter()
    Default constructor.

  - ### AnnotatedJsonMessageWriter

    public AnnotatedJsonMessageWriter(com.emc.documentum.rest.config.BindingConfig bindingConfig)
    Constructor with a custom binding configuration.
    Parameters:
      `bindingConfig` - the binding configuration.

- ## Method Details

  - ### write

    public void write(Object t, OutputStream outputStream) throws IOException
    Write the model to message output stream.
    Specified by:
      `write` in interface `StreamingMessageWriter`
    Parameters:
      `t` - the model instance
      `outputStream` - the message output stream
    Throws:
      `IOException` - when there are errors in writing the object

  - ### write

    public void write(Object t, OutputStream outputStream, org.springframework.http.MediaType contentType) throws IOException
    Write the model to message output stream
    Specified by:
      `write` in interface `StreamingMessageWriter`
    Parameters:
      `t` - the model instance
      `outputStream` - the message output stream
      `contentType` - the content type of the output message
    Throws:
      `IOException` - when there are errors in writing the object