testAddContentFromByteBuf0() — netty Function Reference
Architecture documentation for the testAddContentFromByteBuf0() function in DiskFileUploadTest.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD f325684a_1a54_a69f_08be_0179b41dc96e["testAddContentFromByteBuf0()"] 453c587b_ec9f_a761_a22b_ccf63aa13d1f["DiskFileUploadTest"] f325684a_1a54_a69f_08be_0179b41dc96e -->|defined in| 453c587b_ec9f_a761_a22b_ccf63aa13d1f 601a2cb6_83b8_1508_72c1_cf3b9acf61cd["testAddContentFromByteBuf()"] 601a2cb6_83b8_1508_72c1_cf3b9acf61cd -->|calls| f325684a_1a54_a69f_08be_0179b41dc96e 094e0611_530d_234a_0bbe_c74ddd24e4a5["testAddContentFromCompositeByteBuf()"] 094e0611_530d_234a_0bbe_c74ddd24e4a5 -->|calls| f325684a_1a54_a69f_08be_0179b41dc96e style f325684a_1a54_a69f_08be_0179b41dc96e fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
codec-http/src/test/java/io/netty/handler/codec/http/multipart/DiskFileUploadTest.java lines 195–219
private static void testAddContentFromByteBuf0(boolean composite) throws Exception {
DiskFileUpload f1 = new DiskFileUpload("file3", "file3", "application/json", null, null, 0);
try {
byte[] bytes = new byte[4096];
ThreadLocalRandom.current().nextBytes(bytes);
final ByteBuf buffer;
if (composite) {
buffer = Unpooled.compositeBuffer()
.addComponent(true, Unpooled.wrappedBuffer(bytes, 0 , bytes.length / 2))
.addComponent(true, Unpooled.wrappedBuffer(bytes, bytes.length / 2, bytes.length / 2));
} else {
buffer = Unpooled.wrappedBuffer(bytes);
}
f1.addContent(buffer, true);
ByteBuf buf = f1.getByteBuf();
assertEquals(buf.readerIndex(), 0);
assertEquals(buf.writerIndex(), bytes.length);
assertArrayEquals(bytes, ByteBufUtil.getBytes(buf));
} finally {
//release the ByteBuf
f1.delete();
}
}
Domain
Subdomains
Source
Frequently Asked Questions
What does testAddContentFromByteBuf0() do?
testAddContentFromByteBuf0() is a function in the netty codebase, defined in codec-http/src/test/java/io/netty/handler/codec/http/multipart/DiskFileUploadTest.java.
Where is testAddContentFromByteBuf0() defined?
testAddContentFromByteBuf0() is defined in codec-http/src/test/java/io/netty/handler/codec/http/multipart/DiskFileUploadTest.java at line 195.
What calls testAddContentFromByteBuf0()?
testAddContentFromByteBuf0() is called by 2 function(s): testAddContentFromByteBuf, testAddContentFromCompositeByteBuf.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free