Home / Function/ testDecode() — netty Function Reference

testDecode() — netty Function Reference

Architecture documentation for the testDecode() function in DelimiterBasedFrameDecoderTest.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  d0e0cf37_6740_a75c_c9e6_46a85f85c56e["testDecode()"]
  c84b0949_622d_fa8a_b9ca_47fdabf11726["DelimiterBasedFrameDecoderTest"]
  d0e0cf37_6740_a75c_c9e6_46a85f85c56e -->|defined in| c84b0949_622d_fa8a_b9ca_47fdabf11726
  style d0e0cf37_6740_a75c_c9e6_46a85f85c56e fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

codec-base/src/test/java/io/netty/handler/codec/DelimiterBasedFrameDecoderTest.java lines 108–127

    @Test
    public void testDecode() throws Exception {
        EmbeddedChannel ch = new EmbeddedChannel(
                new DelimiterBasedFrameDecoder(8192, true, Delimiters.lineDelimiter()));

        ch.writeInbound(Unpooled.copiedBuffer("first\r\nsecond\nthird", CharsetUtil.US_ASCII));

        ByteBuf buf = ch.readInbound();
        assertEquals("first", buf.toString(CharsetUtil.US_ASCII));

        ByteBuf buf2 = ch.readInbound();
        assertEquals("second", buf2.toString(CharsetUtil.US_ASCII));
        assertNull(ch.readInbound());
        ch.finish();

        ReferenceCountUtil.release(ch.readInbound());

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

Domain

Subdomains

Frequently Asked Questions

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

Analyze Your Own Codebase

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

Try Supermodel Free