testAddComponentWithLeakAwareByteBuf() — netty Function Reference
Architecture documentation for the testAddComponentWithLeakAwareByteBuf() function in AdvancedLeakAwareByteBufTest.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD 9fc2d00e_7a96_375a_9af4_7a78df5ebea8["testAddComponentWithLeakAwareByteBuf()"] 43acde64_e399_b833_fde7_fce80816a593["AdvancedLeakAwareByteBufTest"] 9fc2d00e_7a96_375a_9af4_7a78df5ebea8 -->|defined in| 43acde64_e399_b833_fde7_fce80816a593 style 9fc2d00e_7a96_375a_9af4_7a78df5ebea8 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
buffer/src/test/java/io/netty/buffer/AdvancedLeakAwareByteBufTest.java lines 38–52
@Test
public void testAddComponentWithLeakAwareByteBuf() {
NoopResourceLeakTracker<ByteBuf> tracker = new NoopResourceLeakTracker<ByteBuf>();
ByteBuf buffer = wrappedBuffer("hello world".getBytes(CharsetUtil.US_ASCII)).slice(6, 5);
ByteBuf leakAwareBuf = wrap(buffer, tracker);
CompositeByteBuf composite = compositeBuffer();
composite.addComponent(true, leakAwareBuf);
byte[] result = new byte[5];
ByteBuf bb = composite.component(0);
bb.readBytes(result);
assertArrayEquals("world".getBytes(CharsetUtil.US_ASCII), result);
composite.release();
}
Domain
Subdomains
Source
Frequently Asked Questions
What does testAddComponentWithLeakAwareByteBuf() do?
testAddComponentWithLeakAwareByteBuf() is a function in the netty codebase, defined in buffer/src/test/java/io/netty/buffer/AdvancedLeakAwareByteBufTest.java.
Where is testAddComponentWithLeakAwareByteBuf() defined?
testAddComponentWithLeakAwareByteBuf() is defined in buffer/src/test/java/io/netty/buffer/AdvancedLeakAwareByteBufTest.java at line 38.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free