List of usage examples for io.netty.handler.stream ChunkedFile ChunkedFile
public ChunkedFile(RandomAccessFile file, int chunkSize) throws IOException
From source file:com.king.platform.net.http.netty.request.ChunkedFileHttpBody.java
License:Apache License
@Override public ChannelFuture writeContent(ChannelHandlerContext ctx) throws IOException { Channel channel = ctx.channel(); return channel.write(new ChunkedFile(file, 1024 * 8), channel.newProgressivePromise()); }