Home / Function/ testFragmentedDecode() — netty Function Reference

testFragmentedDecode() — netty Function Reference

Architecture documentation for the testFragmentedDecode() function in LineBasedFrameDecoderTest.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  27c1f440_ba97_27b1_86e0_3c5744a89ce3["testFragmentedDecode()"]
  619914ab_a3f8_75d9_9843_7bd13a7540ec["LineBasedFrameDecoderTest"]
  27c1f440_ba97_27b1_86e0_3c5744a89ce3 -->|defined in| 619914ab_a3f8_75d9_9843_7bd13a7540ec
  style 27c1f440_ba97_27b1_86e0_3c5744a89ce3 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

codec-base/src/test/java/io/netty/handler/codec/LineBasedFrameDecoderTest.java lines 153–173

    @Test
    public void testFragmentedDecode() throws Exception {
        EmbeddedChannel ch = new EmbeddedChannel(new LineBasedFrameDecoder(8192, false, false));

        assertFalse(ch.writeInbound(copiedBuffer("huu", CharsetUtil.US_ASCII)));
        assertNull(ch.readInbound());

        assertFalse(ch.writeInbound(copiedBuffer("haa\r", CharsetUtil.US_ASCII)));
        assertNull(ch.readInbound());

        assertTrue(ch.writeInbound(copiedBuffer("\nhuuhaa\r\n", CharsetUtil.US_ASCII)));
        ByteBuf buf = ch.readInbound();
        assertEquals("huuhaa\r\n", buf.toString(CharsetUtil.US_ASCII));

        ByteBuf buf2 = ch.readInbound();
        assertEquals("huuhaa\r\n", buf2.toString(CharsetUtil.US_ASCII));
        assertFalse(ch.finishAndReleaseAll());

        buf.release();
        buf2.release();
    }

Domain

Subdomains

Frequently Asked Questions

What does testFragmentedDecode() do?
testFragmentedDecode() is a function in the netty codebase, defined in codec-base/src/test/java/io/netty/handler/codec/LineBasedFrameDecoderTest.java.
Where is testFragmentedDecode() defined?
testFragmentedDecode() is defined in codec-base/src/test/java/io/netty/handler/codec/LineBasedFrameDecoderTest.java at line 153.

Analyze Your Own Codebase

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

Try Supermodel Free