Interface ZeroCopyHttpOutputMessage

All Superinterfaces:
HttpMessage, ReactiveHttpOutputMessage

public interface ZeroCopyHttpOutputMessage extends ReactiveHttpOutputMessage
Sub-interface of ReactiveOutputMessage that has support for "zero-copy" file transfers.
Since:
5.0
Author:
Arjen Poutsma, Juergen Hoeller
See Also:
  • Method Details

    • 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.
      Parameters:
      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
      Returns:
      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.
      Parameters:
      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
      Returns:
      a publisher that indicates completion or error.
      Since:
      5.1