Package io.netty.buffer

Examples of io.netty.buffer.ByteBuf.markReaderIndex()


        if (in.readableBytes() < 4) {
            return null;
        }

        in.markReaderIndex();
        int totalLength = in.readInt();

        if (totalLength > MAX_MESSAGE_SIZE_BYTES) {
            throw new IOException("message too large: " + totalLength + " bytes");
        }
View Full Code Here


    {
        ByteBuf buf = in.order(ByteOrder.LITTLE_ENDIAN);
       
        while (buf.isReadable())
        {
            buf.markReaderIndex();
           
            // get the header failsafe
            int header = buf.readableBytes() >= 2 ? buf.readShort() : -1;
           
            // failcheck
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.