接口 ZeroCopyHttpOutputMessage

所有超级接口:
HttpMessage, ReactiveHttpOutputMessage
所有已知实现类:
ReactorClientHttpRequest, ReactorNetty2ClientHttpRequest, ReactorNetty2ServerHttpResponse, ReactorServerHttpResponse, UndertowServerHttpResponse

public interface ZeroCopyHttpOutputMessage extends ReactiveHttpOutputMessage
Sub-interface of ReactiveOutputMessage that has support for "zero-copy" file transfers.
从以下版本开始:
4.0
作者:
Arjen Poutsma, Juergen Hoeller
另请参阅:
  • 方法详细资料

    • writeWith

      default reactor.core.publisher.Mono<Void> writeWith(File file, long position, long count)
      Use the given File to write the body of the message to the underlying HTTP layer.
      参数:
      file - the file to transfer
      position - the position within the file from which the transfer is to begin
      count - the number of bytes to be transferred
      返回:
      a publisher that indicates completion or error.
    • writeWith

      reactor.core.publisher.Mono<Void> writeWith(Path file, long position, long count)
      Use the given Path to write the body of the message to the underlying HTTP layer.
      参数:
      file - the file to transfer
      position - the position within the file from which the transfer is to begin
      count - the number of bytes to be transferred
      返回:
      a publisher that indicates completion or error.