Home / Function/ testRangedConsolidation() — netty Function Reference

testRangedConsolidation() — netty Function Reference

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

Entity Profile

Dependency Diagram

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

Relationship Graph

Source Code

buffer/src/test/java/io/netty/buffer/AbstractCompositeByteBufTest.java lines 299–314

    @Test
    public void testRangedConsolidation() {
        CompositeByteBuf buf = compositeBuffer(Integer.MAX_VALUE);
        buf.addComponent(wrappedBuffer(new byte[] { 1 }));
        buf.addComponent(wrappedBuffer(new byte[] { 2, 3 }));
        buf.addComponent(wrappedBuffer(new byte[] { 4, 5, 6 }));
        buf.addComponent(wrappedBuffer(new byte[] { 7, 8, 9, 10 }));
        buf.consolidate(1, 2);

        assertEquals(3, buf.numComponents());
        assertEquals(wrappedBuffer(new byte[] { 1 }), buf.component(0));
        assertEquals(wrappedBuffer(new byte[] { 2, 3, 4, 5, 6 }), buf.component(1));
        assertEquals(wrappedBuffer(new byte[] { 7, 8, 9, 10 }), buf.component(2));

        buf.release();
    }

Domain

Subdomains

Frequently Asked Questions

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

Analyze Your Own Codebase

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

Try Supermodel Free