Package org.springframework.http

# 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:
  - Zero-copy

## Method Summary

Modifier and Type
Method
Description
`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.
`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.

### Methods inherited from interface org.springframework.http.HttpMessage

`getHeaders`

### Methods inherited from interface org.springframework.http.ReactiveHttpOutputMessage

`beforeCommit, bufferFactory, isCommitted, setComplete, writeAndFlushWith, writeWith`

## 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