List of usage examples for io.netty.buffer CompositeByteBuf writeByte
@Override public CompositeByteBuf writeByte(int value)
From source file:io.datty.msgpack.test.CompositeByteBufTest.java
License:Apache License
@Test public void testCompositeWrite() { ByteBuf first = Unpooled.buffer();//from ww w.jav a 2s . c o m first.writeByte('a'); CompositeByteBuf result = first.alloc().compositeBuffer(); result.addComponent(true, first); result.writeByte('b'); byte[] actual = ByteBufUtil.getBytes(result); Assert.assertEquals(2, actual.length); Assert.assertEquals('a', actual[0]); Assert.assertEquals('b', actual[1]); }