List of usage examples for io.netty.channel ChannelOutboundBuffer current
public Object current()
From source file:io.vertx.core.http.impl.FileStreamChannel.java
License:Open Source License
@Override protected void doWrite(ChannelOutboundBuffer in) throws Exception { ByteBuf chunk;//from w w w. j a va2 s .c om while (!stream.isNotWritable() && (chunk = (ByteBuf) in.current()) != null) { bytesWritten += chunk.readableBytes(); stream.writeData(chunk.retain(), false); stream.handlerContext.flush(); in.remove(); } }