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
ConstructorsConstructorDescriptionResourceHttpMessageReader(org.springframework.core.codec.ResourceDecoder resourceDecoder) -
Method Summary
Modifier and TypeMethodDescriptiongetReadHints(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.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
-
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:DecoderHttpMessageReaderGet additional hints for decoding based on the input HTTP message.- Overrides:
getReadHintsin classDecoderHttpMessageReader<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:DecoderHttpMessageReaderGet 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:
getReadHintsin classDecoderHttpMessageReader<org.springframework.core.io.Resource>
-