Class MultipartWriterSupport
java.lang.Object
org.springframework.http.codec.LoggingCodecSupport
org.springframework.http.codec.multipart.MultipartWriterSupport
- Direct Known Subclasses:
- MultipartHttpMessageWriter,- PartHttpMessageWriter
Support class for multipart HTTP message writers.
- Since:
- 5.3
- Author:
- Rossen Stoyanchev
- 
Field SummaryFieldsFields inherited from class org.springframework.http.codec.LoggingCodecSupportlogger
- 
Constructor SummaryConstructorsModifierConstructorDescriptionprotectedMultipartWriterSupport(List<MediaType> supportedMediaTypes) Constructor with the list of supported media types.
- 
Method SummaryModifier and TypeMethodDescriptionbooleancanWrite(ResolvableType elementType, MediaType mediaType) protected reactor.core.publisher.Mono<DataBuffer>generateBoundaryLine(byte[] boundary, DataBufferFactory bufferFactory) protected reactor.core.publisher.Mono<DataBuffer>generateLastLine(byte[] boundary, DataBufferFactory bufferFactory) protected byte[]Generate a multipart boundary.protected reactor.core.publisher.Mono<DataBuffer>generateNewLine(DataBufferFactory bufferFactory) protected reactor.core.publisher.Mono<DataBuffer>generatePartHeaders(HttpHeaders headers, DataBufferFactory bufferFactory) Return the configured charset for part headers.protected MediaTypegetMultipartMediaType(MediaType mediaType, byte[] boundary) Prepare theMediaTypeto use by adding "boundary" and "charset" parameters to the givenmediaTypeor "mulitpart/form-data" otherwise by default.voidsetCharset(Charset charset) Set the character set to use for part headers such as "Content-Disposition" (and its filename parameter).Methods inherited from class org.springframework.http.codec.LoggingCodecSupportisEnableLoggingRequestDetails, setEnableLoggingRequestDetails
- 
Field Details- 
DEFAULT_CHARSETTHe default charset used by the writer.
 
- 
- 
Constructor Details- 
MultipartWriterSupportConstructor with the list of supported media types.
 
- 
- 
Method Details- 
getCharsetReturn the configured charset for part headers.
- 
setCharsetSet the character set to use for part headers such as "Content-Disposition" (and its filename parameter).By default this is set to "UTF-8". If changed from this default, the "Content-Type" header will have a "charset" parameter that specifies the character set used. 
- 
getWritableMediaTypes
- 
canWrite
- 
generateMultipartBoundaryprotected byte[] generateMultipartBoundary()Generate a multipart boundary.By default delegates to MimeTypeUtils.generateMultipartBoundary().
- 
getMultipartMediaTypePrepare theMediaTypeto use by adding "boundary" and "charset" parameters to the givenmediaTypeor "mulitpart/form-data" otherwise by default.
- 
generateBoundaryLineprotected reactor.core.publisher.Mono<DataBuffer> generateBoundaryLine(byte[] boundary, DataBufferFactory bufferFactory) 
- 
generateNewLine
- 
generateLastLineprotected reactor.core.publisher.Mono<DataBuffer> generateLastLine(byte[] boundary, DataBufferFactory bufferFactory) 
- 
generatePartHeadersprotected reactor.core.publisher.Mono<DataBuffer> generatePartHeaders(HttpHeaders headers, DataBufferFactory bufferFactory) 
 
-