List of usage examples for io.netty.buffer EmptyByteBuf internalNioBuffer
@Override public ByteBuffer internalNioBuffer(int index, int length)
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)))); }