public class ResourceHttpMessageWriter extends EncoderHttpMessageWriter<Resource>
HttpMessageWriter that can write
Resources.
For a Resource reader simply use ResourceDecoder wrapped with
DecoderHttpMessageReader.
| Constructor and Description |
|---|
ResourceHttpMessageWriter() |
ResourceHttpMessageWriter(int bufferSize) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addHeaders(HttpHeaders headers,
Resource resource,
MediaType contentType) |
reactor.core.publisher.Mono<Void> |
write(org.reactivestreams.Publisher<? extends Resource> inputStream,
ResolvableType type,
MediaType contentType,
ReactiveHttpOutputMessage outputMessage)
Write an given object to the given output message.
|
canWrite, getDefaultContentType, getWritableMediaTypespublic ResourceHttpMessageWriter()
public ResourceHttpMessageWriter(int bufferSize)
public reactor.core.publisher.Mono<Void> write(org.reactivestreams.Publisher<? extends Resource> inputStream, ResolvableType type, MediaType contentType, ReactiveHttpOutputMessage outputMessage)
HttpMessageWriterwrite in interface HttpMessageWriter<Resource>write in class EncoderHttpMessageWriter<Resource>inputStream - the input stream to writetype - the stream element type to process.contentType - the content type to use when writing. May be null to
indicate that the default content type of the converter must be used.outputMessage - the message to write toMono of objectprotected void addHeaders(HttpHeaders headers, Resource resource, MediaType contentType)