Package org.springframework.http.codec

# Class ResourceHttpMessageReader

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

All Implemented Interfaces:
  `HttpMessageReader<org.springframework.core.io.Resource>`

public class ResourceHttpMessageReader extends DecoderHttpMessageReader<org.springframework.core.io.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
Description
`ResourceHttpMessageReader()`
`ResourceHttpMessageReader(org.springframework.core.codec.ResourceDecoder resourceDecoder)`

## Method Summary

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

### 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 Details

### ResourceHttpMessageReader

public ResourceHttpMessageReader()

### ResourceHttpMessageReader

public ResourceHttpMessageReader(org.springframework.core.codec.ResourceDecoder resourceDecoder)

## Method Details

### getReadHints

protected Map<String,Object> getReadHints(org.springframework.core.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<org.springframework.core.io.Resource>`

### getReadHints

protected Map<String,Object> getReadHints(org.springframework.core.ResolvableType actualType, org.springframework.core.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<org.springframework.core.io.Resource>`