类 PartHttpMessageWriter
java.lang.Object
cn.taketoday.http.codec.LoggingCodecSupport
cn.taketoday.http.codec.multipart.MultipartWriterSupport
cn.taketoday.http.codec.multipart.PartHttpMessageWriter
- 所有已实现的接口:
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.- 从以下版本开始:
- 4.0
- 作者:
- Rossen Stoyanchev
-
字段概要
从类继承的字段 cn.taketoday.http.codec.multipart.MultipartWriterSupport
DEFAULT_CHARSET从类继承的字段 cn.taketoday.http.codec.LoggingCodecSupport
logger -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明booleanWhether the given object type is supported by this writer.private reactor.core.publisher.Flux<cn.taketoday.core.io.buffer.DataBuffer>encodePart(byte[] boundary, Part part, cn.taketoday.core.io.buffer.DataBufferFactory bufferFactory) reactor.core.publisher.Mono<Void>write(org.reactivestreams.Publisher<? extends Part> parts, cn.taketoday.core.ResolvableType elementType, MediaType mediaType, ReactiveHttpOutputMessage outputMessage, Map<String, Object> hints) Write an given stream of object to the output message.从类继承的方法 cn.taketoday.http.codec.multipart.MultipartWriterSupport
generateBoundaryLine, generateLastLine, generateMultipartBoundary, generateNewLine, generatePartHeaders, getCharset, getMultipartMediaType, getWritableMediaTypes, setCharset从类继承的方法 cn.taketoday.http.codec.LoggingCodecSupport
isEnableLoggingRequestDetails, setEnableLoggingRequestDetails从类继承的方法 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait从接口继承的方法 cn.taketoday.http.codec.HttpMessageWriter
getWritableMediaTypes, getWritableMediaTypes, write
-
构造器详细资料
-
PartHttpMessageWriter
public PartHttpMessageWriter()
-
-
方法详细资料
-
canWrite
public boolean canWrite(cn.taketoday.core.ResolvableType elementType, @Nullable MediaType mediaType) 从接口复制的说明:HttpMessageWriterWhether the given object type is supported by this writer.- 指定者:
canWrite在接口中HttpMessageWriter<Part>- 参数:
elementType- the type of object to checkmediaType- the media type for the write (possiblynull)- 返回:
trueif writable,falseotherwise
-
write
public reactor.core.publisher.Mono<Void> write(org.reactivestreams.Publisher<? extends Part> parts, cn.taketoday.core.ResolvableType elementType, @Nullable MediaType mediaType, ReactiveHttpOutputMessage outputMessage, Map<String, Object> hints) 从接口复制的说明:HttpMessageWriterWrite an given stream of object to the output message.- 指定者:
write在接口中HttpMessageWriter<Part>- 参数:
parts- the objects to writeelementType- the type of objects in the stream which must have been previously checked viaHttpMessageWriter.canWrite(ResolvableType, MediaType)mediaType- the content type for the write (possiblynullto indicate that the default content type of the writer must be used)outputMessage- the message to write tohints- additional information about how to encode and write- 返回:
- indicates completion or error
-
encodePart
private reactor.core.publisher.Flux<cn.taketoday.core.io.buffer.DataBuffer> encodePart(byte[] boundary, Part part, cn.taketoday.core.io.buffer.DataBufferFactory bufferFactory)
-