reactor-netty-core/src/main/java/reactor/netty/NettyOutbound.java
/**
	 * Sends content from the given {@link Path} using
	 * {@link java.nio.channels.FileChannel#transferTo(long, long, WritableByteChannel)}
	 * support, if the system supports it, the path resolves to a local file
	 * system {@link File}, compression and SSL/TLS is not enabled, then transfer will
	 * use zero-byte copy to the peer., otherwise chunked read/write will be used.
	 * <p>It will listens for any error on write and closes
	 * on terminal signal (complete|error). If more than one publisher is attached
	 * (multiple calls to send()) completion occurs after all publishers complete.</p>
	 * <p></p>Note: Nesting any send* method is not supported.</p>
	 *
	 * @param file the file Path
	 * @param position where to start
	 * @param count how much to transfer
	 *
	 * @return A Publisher to signal successful sequence write (e.g. after "flush") or any
	 * error during write
	 */
Sends content from the given  Path using
java.nio.channels.FileChannel#transferTo(long, long, WritableByteChannel)
support, if the system supports it, the path resolves to a local file
system  File, compression and SSL/TLS is not enabled, then transfer will
use zero-byte copy to the peer., otherwise chunked read/write will be used.
It will listens for any error on write and closes
on terminal signal (complete|error). If more than one publisher is attached
(multiple calls to send()) completion occurs after all publishers complete.
Note: Nesting any send* method is not supported.

@param file the file Path
@param position where to start
@param count how much to transfer

@return A Publisher to signal successful sequence write  or any
error during write
Sends content from the given Path using java . nio . channels . FileChannel#transferTo ( long long WritableByteChannel ) support if the system supports it the path resolves to a local file system File compression and SSL / TLS is not enabled then transfer will use zero - byte copy to the peer . otherwise chunked read / write will be used . It will listens for any error on write and closes on terminal signal ( complete|error ) . If more than one publisher is attached ( multiple calls to send () ) completion occurs after all publishers complete . Note : Nesting any send * method is not supported . @param file the file Path @param position where to start @param count how much to transfer @return A Publisher to signal successful sequence write or any error during write
default NettyOutbound sendFile(Path file, long position, long count) {
		Objects.requireNonNull(file, "filepath");
		return sendUsing(() -> FileChannel.open(file, StandardOpenOption.READ),
				(c, fc) -> {
					if (ReactorNetty.mustChunkFileTransfer(c, file)) {
						ReactorNetty.addChunkedWriter(c);
						try {
							return new ChunkedNioFile(fc, position, count, 1024);
						}
						catch (Exception ioe) {
							throw Exceptions.propagate(ioe);
						}
					}
					return new DefaultFileRegion(fc, position, count);
				},
				ReactorNetty.fileCloser);
	}
default NettyOutbound sendFile ( Path file , long position , long count ) { Objects . requireNonNull ( file , "filepath" ) ; return sendUsing ( ( ) -> FileChannel . open ( file , StandardOpenOption . READ ) , ( c , fc ) -> { if ( ReactorNetty . mustChunkFileTransfer ( c , file ) ) { ReactorNetty . addChunkedWriter ( c ) ; try { return new ChunkedNioFile ( fc , position , count , 1024 ) ; } catch ( Exception ioe ) { throw Exceptions . propagate ( ioe ) ; } } return new DefaultFileRegion ( fc , position , count ) ; } , ReactorNetty . fileCloser ) ; }
Sends content from the given {@link Path} using
 {@link java.nio.channels.FileChannel#transferTo(long, long, WritableByteChannel)}
 support, if the system supports it, the path resolves to a local file
 system {@link File}, compression and SSL/TLS is not enabled, then transfer will
 use zero-byte copy to the peer., otherwise chunked read/write will be used.
Sends content from the given { @link Path } using { @link java . nio . channels . FileChannel#transferTo ( long long WritableByteChannel ) } support if the system supports it the path resolves to a local file system { @link File } compression and SSL / TLS is not enabled then transfer will use zero - byte copy to the peer . otherwise chunked read / write will be used .