Home / Function/ testSetContentFromByteBuf() — netty Function Reference

testSetContentFromByteBuf() — netty Function Reference

Architecture documentation for the testSetContentFromByteBuf() function in DiskFileUploadTest.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  270466c3_ed30_cfeb_8c57_478f81be9bbd["testSetContentFromByteBuf()"]
  453c587b_ec9f_a761_a22b_ccf63aa13d1f["DiskFileUploadTest"]
  270466c3_ed30_cfeb_8c57_478f81be9bbd -->|defined in| 453c587b_ec9f_a761_a22b_ccf63aa13d1f
  ba93742e_e095_ec03_62ad_a5ac126c1d2d["doReadFile()"]
  270466c3_ed30_cfeb_8c57_478f81be9bbd -->|calls| ba93742e_e095_ec03_62ad_a5ac126c1d2d
  style 270466c3_ed30_cfeb_8c57_478f81be9bbd fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

codec-http/src/test/java/io/netty/handler/codec/http/multipart/DiskFileUploadTest.java lines 146–161

    @Test
    public void testSetContentFromByteBuf() throws Exception {
        DiskFileUpload f1 = new DiskFileUpload("file2", "file2", "application/json", null, null, 0);
        try {
            String json = "{\"hello\":\"world\"}";
            byte[] bytes = json.getBytes(CharsetUtil.UTF_8);
            f1.setContent(Unpooled.wrappedBuffer(bytes));
            assertEquals(json, f1.getString());
            assertArrayEquals(bytes, f1.get());
            File file = f1.getFile();
            assertEquals((long) bytes.length, file.length());
            assertArrayEquals(bytes, doReadFile(file, bytes.length));
        } finally {
            f1.delete();
        }
    }

Domain

Subdomains

Calls

Frequently Asked Questions

What does testSetContentFromByteBuf() do?
testSetContentFromByteBuf() is a function in the netty codebase, defined in codec-http/src/test/java/io/netty/handler/codec/http/multipart/DiskFileUploadTest.java.
Where is testSetContentFromByteBuf() defined?
testSetContentFromByteBuf() is defined in codec-http/src/test/java/io/netty/handler/codec/http/multipart/DiskFileUploadTest.java at line 146.
What does testSetContentFromByteBuf() call?
testSetContentFromByteBuf() calls 1 function(s): doReadFile.

Analyze Your Own Codebase

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

Try Supermodel Free