Example usage for io.netty.buffer EmptyByteBuf nioBufferCount

List of usage examples for io.netty.buffer EmptyByteBuf nioBufferCount

Introduction

In this page you can find the example usage for io.netty.buffer EmptyByteBuf nioBufferCount.

Prototype

@Override
    public int nioBufferCount() 

Source Link

Usage

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))));
}