Package 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 aResourceDecoder
that extracts the filename from the"Content-Disposition"
header, if available, and passes it as theResourceDecoder.FILENAME_HINT
.- Since:
- 5.2
- Author:
- Rossen Stoyanchev
Constructor Summary
Constructors Constructor Description ResourceHttpMessageReader()
ResourceHttpMessageReader(ResourceDecoder resourceDecoder)
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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, read, read, readMono, readMono
Constructor Detail
ResourceHttpMessageReader
public ResourceHttpMessageReader()
ResourceHttpMessageReader
public ResourceHttpMessageReader(ResourceDecoder resourceDecoder)
Method Detail
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 ofHttpMessageDecoder
.- Overrides:
getReadHints
in classDecoderHttpMessageReader<Resource>