public final ChannelFuture spliceTo(final FileDescriptor ch, final int offset, final int len,
                                        final ChannelPromise promise) {
        checkPositiveOrZero(len, "len");
        checkPositiveOrZero(offset, "offser");
        if (config().getEpollMode() != EpollMode.LEVEL_TRIGGERED) {
            throw new IllegalStateException("spliceTo() supported only when using " + EpollMode.LEVEL_TRIGGERED);
        }
        checkNotNull(promise, "promise");
        if (!isOpen()) {
            promise.tryFailure(SPLICE_TO_CLOSED_CHANNEL_EXCEPTION);
        } else {
            addToSpliceQueue(new SpliceFdTask(ch, offset, len, promise));
            failSpliceIfClosed(promise);
        }
        return promise;
    }
public final ChannelFuture spliceTo ( final FileDescriptor ch , final int offset , final int len , final ChannelPromise promise ) { checkPositiveOrZero ( len , "len" ) ; checkPositiveOrZero ( offset , "offser" ) ; if ( config ( ) . getEpollMode ( ) != EpollMode . LEVEL_TRIGGERED ) { throw new IllegalStateException ( "spliceTo() supported only when using " + EpollMode . LEVEL_TRIGGERED ) ; } checkNotNull ( promise , "promise" ) ; if ( ! isOpen ( ) ) { promise . tryFailure ( SPLICE_TO_CLOSED_CHANNEL_EXCEPTION ) ; } else { addToSpliceQueue ( new SpliceFdTask ( ch , offset , len , promise ) ) ; failSpliceIfClosed ( promise ) ; } return promise ; }
Splice from this {@link AbstractEpollStreamChannel} to another {@link FileDescriptor}.
The {@code offset} is the offset for the {@link FileDescriptor} and {@code len} is the
number of bytes to splice. If using {@link Integer#MAX_VALUE} it will splice until the
{@link ChannelFuture} was canceled or it was failed.

Please note:
<ul>
<li>{@link EpollChannelConfig#getEpollMode()} must be {@link EpollMode#LEVEL_TRIGGERED} for this
{@link AbstractEpollStreamChannel}</li>
<li>the {@link FileDescriptor} will not be closed after the {@link ChannelPromise} is notified</li>
<li>this channel must be registered to an event loop or {@link IllegalStateException} will be thrown.</li>
</ul>