Package com.taobao.gecko.core.buffer

Examples of com.taobao.gecko.core.buffer.IoBuffer.remaining()


        IoBuffer buf = IoBuffer.wrap("put test 1 5 0 10\r\nhel".getBytes());

        PutCommand decodedCmd = (PutCommand) this.decoder.decode(buf, null);
        assertNull(decodedCmd);
        assertEquals(0, buf.position());
        assertEquals(buf.capacity(), buf.remaining());

        buf = IoBuffer.wrap("put test 1 5 0 10\r\nhello".getBytes());
        decodedCmd = (PutCommand) this.decoder.decode(buf, null);
        assertNotNull(decodedCmd);
        assertEquals("test", decodedCmd.getTopic());
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.