testDuplicateOfReadOnly() — netty Function Reference
Architecture documentation for the testDuplicateOfReadOnly() function in ByteBufDerivationTest.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD 41acf752_e802_29f6_91cb_28c5ca9a84cc["testDuplicateOfReadOnly()"] fd4020ab_f8d0_a065_dc31_0331d0318aa5["ByteBufDerivationTest"] 41acf752_e802_29f6_91cb_28c5ca9a84cc -->|defined in| fd4020ab_f8d0_a065_dc31_0331d0318aa5 style 41acf752_e802_29f6_91cb_28c5ca9a84cc fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
buffer/src/test/java/io/netty/buffer/ByteBufDerivationTest.java lines 142–154
@Test
public void testDuplicateOfReadOnly() throws Exception {
ByteBuf buf = Unpooled.buffer(8).setIndex(1, 7);
ByteBuf ro = Unpooled.unmodifiableBuffer(buf).setIndex(2, 6);
ByteBuf dup = ro.duplicate();
assertInstanceOf(ReadOnlyByteBuf.class, ro);
assertSame(buf, ro.unwrap());
assertEquals(dup.readerIndex(), ro.readerIndex());
assertEquals(dup.writerIndex(), ro.writerIndex());
assertEquals(dup.capacity(), ro.capacity());
assertEquals(dup.maxCapacity(), ro.maxCapacity());
}
Domain
Subdomains
Source
Frequently Asked Questions
What does testDuplicateOfReadOnly() do?
testDuplicateOfReadOnly() is a function in the netty codebase, defined in buffer/src/test/java/io/netty/buffer/ByteBufDerivationTest.java.
Where is testDuplicateOfReadOnly() defined?
testDuplicateOfReadOnly() is defined in buffer/src/test/java/io/netty/buffer/ByteBufDerivationTest.java at line 142.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free