Package 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
Description
`DataWithMediaType(Object data, org.springframework.http.MediaType mediaType)`

## Method Summary

Modifier and Type
Method
Description
`Object`
`getData()`
`org.springframework.http.MediaType`
`getMediaType()`

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

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

## Constructor Details

### DataWithMediaType

public DataWithMediaType(Object data, @Nullable org.springframework.http.MediaType mediaType)

## Method Details

### getData

public Object getData()

### getMediaType

@Nullable public org.springframework.http.MediaType getMediaType()