类 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
  • 构造器详细资料

    • PartHttpMessageWriter

      public PartHttpMessageWriter()
  • 方法详细资料

    • canWrite

      public boolean canWrite(cn.taketoday.core.ResolvableType elementType, @Nullable MediaType mediaType)
      从接口复制的说明: HttpMessageWriter
      Whether the given object type is supported by this writer.
      指定者:
      canWrite 在接口中 HttpMessageWriter<Part>
      参数:
      elementType - the type of object to check
      mediaType - the media type for the write (possibly null)
      返回:
      true if writable, false otherwise
    • 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)
      从接口复制的说明: HttpMessageWriter
      Write an given stream of object to the output message.
      指定者:
      write 在接口中 HttpMessageWriter<Part>
      参数:
      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 null to 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
      返回:
      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)