Home / Function/ testFileRegion() — netty Function Reference

testFileRegion() — netty Function Reference

Architecture documentation for the testFileRegion() function in DefaultFileRegionTest.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  ccbd6323_a2cd_2443_66c0_80c4b6f1c5f0["testFileRegion()"]
  4827225f_a470_f31a_244d_0b1a22a04604["DefaultFileRegionTest"]
  ccbd6323_a2cd_2443_66c0_80c4b6f1c5f0 -->|defined in| 4827225f_a470_f31a_244d_0b1a22a04604
  c89c7a55_3cbd_94bf_17d0_ba91c46a6afd["testCreateFromFile()"]
  c89c7a55_3cbd_94bf_17d0_ba91c46a6afd -->|calls| ccbd6323_a2cd_2443_66c0_80c4b6f1c5f0
  32ee1b60_be8c_8e93_0f1a_6662d535f46f["testCreateFromFileChannel()"]
  32ee1b60_be8c_8e93_0f1a_6662d535f46f -->|calls| ccbd6323_a2cd_2443_66c0_80c4b6f1c5f0
  style ccbd6323_a2cd_2443_66c0_80c4b6f1c5f0 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

transport/src/test/java/io/netty/channel/DefaultFileRegionTest.java lines 72–83

    private static void testFileRegion(FileRegion region) throws IOException  {
        ByteArrayOutputStream outputStream = new ByteArrayOutputStream();

        try (WritableByteChannel channel = Channels.newChannel(outputStream)) {
            assertEquals(data.length, region.count());
            assertEquals(0, region.transferred());
            assertEquals(data.length, region.transferTo(channel, 0));
            assertEquals(data.length, region.count());
            assertEquals(data.length, region.transferred());
            assertArrayEquals(data, outputStream.toByteArray());
        }
    }

Domain

Subdomains

Frequently Asked Questions

What does testFileRegion() do?
testFileRegion() is a function in the netty codebase, defined in transport/src/test/java/io/netty/channel/DefaultFileRegionTest.java.
Where is testFileRegion() defined?
testFileRegion() is defined in transport/src/test/java/io/netty/channel/DefaultFileRegionTest.java at line 72.
What calls testFileRegion()?
testFileRegion() is called by 2 function(s): testCreateFromFile, testCreateFromFileChannel.

Analyze Your Own Codebase

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

Try Supermodel Free