org.springframework.web.servlet.mvc.method.annotation

## Class ResponseBodyEmitter.DataWithMediaType

- java.lang.Object
- - org.springframework.web.servlet.mvc.method.annotation.ResponseBodyEmitter.DataWithMediaType

- Enclosing class:
    ResponseBodyEmitter

      public static class ResponseBodyEmitter.DataWithMediaType
      extends Object

  A simple holder of data to be written along with a MediaType hint for selecting a message converter to write with.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `DataWithMediaType(Object data, MediaType mediaType)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `Object` | `getData()`
    `MediaType` | `getMediaType()`

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

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

- - ### Constructor Detail

    - #### DataWithMediaType

          public DataWithMediaType(Object data,
                                   @Nullable
                                   MediaType mediaType)

  - ### Method Detail

    - #### getData

          public Object getData()

    - #### getMediaType

          @Nullable
          public MediaType getMediaType()