final RandomAccessFile raf = new RandomAccessFile(file, "r");
try {
ChannelFuture writeFuture;
if (ChannelManager.isSslHandlerConfigured(channel.pipeline()) || nettyConfig.isDisableZeroCopy()) {
writeFuture = channel.write(new ChunkedFile(raf, offset, length, nettyConfig.getChunkedFileChunkSize()), channel.newProgressivePromise());
} else {
FileRegion region = new DefaultFileRegion(raf.getChannel(), offset, length);
writeFuture = channel.write(region, channel.newProgressivePromise());
}
writeFuture.addListener(new ProgressListener(config, future.getAsyncHandler(), future, false, getContentLength()) {