Home / Function/ testInternalNioBuffer() — netty Function Reference

testInternalNioBuffer() — netty Function Reference

Architecture documentation for the testInternalNioBuffer() function in AbstractCompositeByteBufTest.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  64e3dce1_cf68_5040_645a_ef80da06132d["testInternalNioBuffer()"]
  47bc0a20_e243_89ff_132b_99ac6b23835f["AbstractCompositeByteBufTest"]
  64e3dce1_cf68_5040_645a_ef80da06132d -->|defined in| 47bc0a20_e243_89ff_132b_99ac6b23835f
  style 64e3dce1_cf68_5040_645a_ef80da06132d fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

buffer/src/test/java/io/netty/buffer/AbstractCompositeByteBufTest.java lines 1002–1026

    @Override
    @Test
    public void testInternalNioBuffer() {
        CompositeByteBuf buf = compositeBuffer();
        assertEquals(0, buf.internalNioBuffer(0, 0).remaining());

        // If non-derived buffer is added, its internal buffer should be returned
        ByteBuf concreteBuffer = directBuffer().writeByte(1);
        buf.addComponent(concreteBuffer);
        assertSame(concreteBuffer.internalNioBuffer(0, 1), buf.internalNioBuffer(0, 1));
        buf.release();

        // In derived cases, the original internal buffer must not be used
        buf = compositeBuffer();
        concreteBuffer = directBuffer().writeByte(1);
        buf.addComponent(concreteBuffer.slice());
        assertNotSame(concreteBuffer.internalNioBuffer(0, 1), buf.internalNioBuffer(0, 1));
        buf.release();

        buf = compositeBuffer();
        concreteBuffer = directBuffer().writeByte(1);
        buf.addComponent(concreteBuffer.duplicate());
        assertNotSame(concreteBuffer.internalNioBuffer(0, 1), buf.internalNioBuffer(0, 1));
        buf.release();
    }

Domain

Subdomains

Frequently Asked Questions

What does testInternalNioBuffer() do?
testInternalNioBuffer() is a function in the netty codebase, defined in buffer/src/test/java/io/netty/buffer/AbstractCompositeByteBufTest.java.
Where is testInternalNioBuffer() defined?
testInternalNioBuffer() is defined in buffer/src/test/java/io/netty/buffer/AbstractCompositeByteBufTest.java at line 1002.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free