class ChannelBody implements Body {

    private final String fileName;
    private final FileChannel content;

    public ChannelBody(final String fileName, final FileChannel content) {
        this.fileName = fileName;
        this.content = content;
    }

    public static ChannelBody of(File file) throws IOException {<FILL_FUNCTION_BODY>}

    public static ChannelBody of(FileChannel channel) throws IOException {
        return new ChannelBody(null, channel);
    }

    @Override
    public HttpResponse write(BodyWriter writer) {
        return writer.onFileChannel(fileName, content);
    }

}

        FileChannel fileChannel = FileChannel.open(file.toPath(), StandardOpenOption.READ);
        return new ChannelBody(file.getName(), fileChannel);
    
<no_super_class>