Package org.jboss.netty.buffer

Examples of org.jboss.netty.buffer.CompositeChannelBuffer.readerIndex()


    protected Object encode(ChannelHandlerContext ctx, Channel channel, Object msg) throws Exception {
        Object retVal = super.encode(ctx, channel, msg);
        if (retVal instanceof CompositeChannelBuffer) {
            CompositeChannelBuffer ccb = (CompositeChannelBuffer) retVal;
            if (ccb.useGathering() != NettyUtils.DEFAULT_GATHERING) {
                List<ChannelBuffer> decompose = ccb.decompose(ccb.readerIndex(), ccb.readableBytes());
                return ChannelBuffers.wrappedBuffer(NettyUtils.DEFAULT_GATHERING,
                        decompose.toArray(new ChannelBuffer[decompose.size()]));
            }
        }
        return retVal;
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.