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>
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
-
Method Summary
Modifier and TypeMethodDescriptiongetReadHints
(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.getReadHints
(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
-
Constructor Details
-
ResourceHttpMessageReader
public ResourceHttpMessageReader() -
ResourceHttpMessageReader
-
-
Method Details
-
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 classDecoderHttpMessageReader<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 ofHttpMessageDecoder
.- Overrides:
getReadHints
in classDecoderHttpMessageReader<Resource>
-