Home / Function/ testReadBytes() — netty Function Reference

testReadBytes() — netty Function Reference

Architecture documentation for the testReadBytes() function in AbstractByteBufTest.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  31c52b28_afe1_2cf4_7fd0_61bb3a2adcfd["testReadBytes()"]
  6540f2d1_cdad_6705_dd1d_9a24e2e53242["AbstractByteBufTest"]
  31c52b28_afe1_2cf4_7fd0_61bb3a2adcfd -->|defined in| 6540f2d1_cdad_6705_dd1d_9a24e2e53242
  style 31c52b28_afe1_2cf4_7fd0_61bb3a2adcfd fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

buffer/src/test/java/io/netty/buffer/AbstractByteBufTest.java lines 5900–5913

    @Test
    public void testReadBytes() {
        ByteBuf buffer = newBuffer(8);
        byte[] bytes = new byte[8];
        buffer.writeBytes(bytes);

        ByteBuf buffer2 = buffer.readBytes(4);
        assertSame(buffer.alloc(), buffer2.alloc());
        assertEquals(4, buffer.readerIndex());
        assertTrue(buffer.release());
        assertEquals(0, buffer.refCnt());
        assertTrue(buffer2.release());
        assertEquals(0, buffer2.refCnt());
    }

Domain

Subdomains

Frequently Asked Questions

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

Analyze Your Own Codebase

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

Try Supermodel Free