Class PartHttpMessageWriter
java.lang.Object
org.springframework.http.codec.LoggingCodecSupport
org.springframework.http.codec.multipart.MultipartWriterSupport
org.springframework.http.codec.multipart.PartHttpMessageWriter
- All Implemented Interfaces:
- HttpMessageWriter<Part>
public class PartHttpMessageWriter
extends MultipartWriterSupport
implements HttpMessageWriter<Part>
HttpMessageWriter for writing with Part. This can be useful
 on the server side to write a Flux<Part> received from a client to
 some remote service.- Since:
- 5.3
- Author:
- Rossen Stoyanchev
- 
Field SummaryFields inherited from class org.springframework.http.codec.multipart.MultipartWriterSupportDEFAULT_CHARSETFields inherited from class org.springframework.http.codec.LoggingCodecSupportlogger
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionreactor.core.publisher.Mono<Void>write(Publisher<? extends Part> parts, ResolvableType elementType, MediaType mediaType, ReactiveHttpOutputMessage outputMessage, Map<String, Object> hints) Write a given stream of object to the output message.Methods inherited from class org.springframework.http.codec.multipart.MultipartWriterSupportcanWrite, generateBoundaryLine, generateLastLine, generateMultipartBoundary, generateNewLine, generatePartHeaders, getCharset, getMultipartMediaType, getWritableMediaTypes, setCharsetMethods inherited from class org.springframework.http.codec.LoggingCodecSupportisEnableLoggingRequestDetails, setEnableLoggingRequestDetailsMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.springframework.http.codec.HttpMessageWritercanWrite, getWritableMediaTypes, getWritableMediaTypes, write
- 
Constructor Details- 
PartHttpMessageWriterpublic PartHttpMessageWriter()
 
- 
- 
Method Details- 
writepublic reactor.core.publisher.Mono<Void> write(Publisher<? extends Part> parts, ResolvableType elementType, @Nullable MediaType mediaType, ReactiveHttpOutputMessage outputMessage, Map<String, Object> hints) Description copied from interface:HttpMessageWriterWrite a given stream of object to the output message.- Specified by:
- writein interface- HttpMessageWriter<Part>
- Parameters:
- parts- the objects to write
- elementType- the type of objects in the stream which must have been previously checked via- HttpMessageWriter.canWrite(ResolvableType, MediaType)
- mediaType- the content type for the write (possibly- nullto indicate that the default content type of the writer must be used)
- outputMessage- the message to write to
- hints- additional information about how to encode and write
- Returns:
- indicates completion or error
 
 
-