org.springframework.http.codec

## Class ResourceHttpMessageReader

- java.lang.Object
- - org.springframework.http.codec.DecoderHttpMessageReader<Resource>
  - - org.springframework.http.codec.ResourceHttpMessageReader

- All Implemented Interfaces:
    HttpMessageReader<Resource>

      public class ResourceHttpMessageReader
      extends DecoderHttpMessageReader<Resource>

  `HttpMessageReader` that wraps and delegates to a `ResourceDecoder` that extracts the filename from the `"Content-Disposition"` header, if available, and passes it as the `ResourceDecoder.FILENAME_HINT`.
  Since:
    5.2
  Author:
    Rossen Stoyanchev

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `ResourceHttpMessageReader()`
    `ResourceHttpMessageReader(ResourceDecoder resourceDecoder)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected Map<String,Object>` | `getReadHints(ResolvableType elementType, ReactiveHttpInputMessage message)` Get additional hints for decoding based on the input HTTP message.
    `protected Map<String,Object>` | `getReadHints(ResolvableType actualType, ResolvableType elementType, ServerHttpRequest request, ServerHttpResponse response)` Get additional hints for decoding for example based on the server request or annotations from controller method parameters.

    - ### Methods inherited from class org.springframework.http.codec.DecoderHttpMessageReader

      `canRead, getContentType, getDecoder, getReadableMediaTypes, getReadableMediaTypes, read, read, readMono, readMono`

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

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

- - ### Constructor Detail

    - #### ResourceHttpMessageReader

          public ResourceHttpMessageReader()

    - #### ResourceHttpMessageReader

          public ResourceHttpMessageReader(ResourceDecoder resourceDecoder)

  - ### Method Detail

    - #### getReadHints

          protected Map<String,Object> getReadHints(ResolvableType elementType,
                                                    ReactiveHttpInputMessage message)

      Description copied from class: `DecoderHttpMessageReader`
      Get additional hints for decoding based on the input HTTP message.
      Overrides:
        `getReadHints` in class `DecoderHttpMessageReader<Resource>`

    - #### getReadHints

          protected Map<String,Object> getReadHints(ResolvableType actualType,
                                                    ResolvableType elementType,
                                                    ServerHttpRequest request,
                                                    ServerHttpResponse response)

      Description copied from class: `DecoderHttpMessageReader`
      Get additional hints for decoding for example based on the server request or annotations from controller method parameters. By default, delegate to the decoder if it is an instance of `HttpMessageDecoder`.
      Overrides:
        `getReadHints` in class `DecoderHttpMessageReader<Resource>`