List of usage examples for io.netty.buffer EmptyByteBuf nioBufferCount
@Override public int nioBufferCount()
From source file:io.netty.buffer.EmptyByteBufTest.java
License:Apache License
@Test public void testNioBuffer() { EmptyByteBuf empty = new EmptyByteBuf(UnpooledByteBufAllocator.DEFAULT); assertThat(empty.nioBufferCount(), is(1)); assertThat(empty.nioBuffer().position(), is(0)); assertThat(empty.nioBuffer().limit(), is(0)); assertThat(empty.nioBuffer(), is(sameInstance(empty.nioBuffer()))); assertThat(empty.nioBuffer(), is(sameInstance(empty.internalNioBuffer(0, 0)))); }