execControl.blocking(() -> new FileInputStream(file.toFile()).getChannel()).then(fileChannel -> {
FileRegion defaultFileRegion = new DefaultFileRegion(fileChannel, 0, size);
transmit(responseStatus, defaultFileRegion);
});
} else {
execControl.blocking(() -> Files.newByteChannel(file)).then(fileChannel -> transmit(responseStatus, new ChunkedInputAdapter(new ChunkedNioStream(fileChannel))));
}
}