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