testSingleDecode() — netty Function Reference
Architecture documentation for the testSingleDecode() function in ReplayingDecoderTest.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD 278d27cf_bf83_ba22_a610_468610f0f152["testSingleDecode()"] 342ea63b_1bca_5900_7b37_0cc8ddc3402d["ReplayingDecoderTest"] 278d27cf_bf83_ba22_a610_468610f0f152 -->|defined in| 342ea63b_1bca_5900_7b37_0cc8ddc3402d cb764356_39c7_bd8e_9532_ace3c3e0ff88["LineDecoder()"] 278d27cf_bf83_ba22_a610_468610f0f152 -->|calls| cb764356_39c7_bd8e_9532_ace3c3e0ff88 style 278d27cf_bf83_ba22_a610_468610f0f152 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
codec-base/src/test/java/io/netty/handler/codec/ReplayingDecoderTest.java lines 110–139
@Test
public void testSingleDecode() throws Exception {
LineDecoder decoder = new LineDecoder();
decoder.setSingleDecode(true);
EmbeddedChannel ch = new EmbeddedChannel(decoder);
// "C\n" should be appended to "AB" so that LineDecoder decodes it correctly.
ch.writeInbound(Unpooled.wrappedBuffer(new byte[]{'C', '\n' , 'B', '\n'}));
ByteBuf buf = Unpooled.wrappedBuffer(new byte[] {'C'});
ByteBuf buf2 = ch.readInbound();
assertEquals(buf, buf2);
buf.release();
buf2.release();
assertNull(ch.readInbound(), "Must be null as it must only decode one frame");
ch.read();
ch.finish();
buf = Unpooled.wrappedBuffer(new byte[] {'B'});
buf2 = ch.readInbound();
assertEquals(buf, buf2);
buf.release();
buf2.release();
assertNull(ch.readInbound());
}
Domain
Subdomains
Calls
Source
Frequently Asked Questions
What does testSingleDecode() do?
testSingleDecode() is a function in the netty codebase, defined in codec-base/src/test/java/io/netty/handler/codec/ReplayingDecoderTest.java.
Where is testSingleDecode() defined?
testSingleDecode() is defined in codec-base/src/test/java/io/netty/handler/codec/ReplayingDecoderTest.java at line 110.
What does testSingleDecode() call?
testSingleDecode() calls 1 function(s): LineDecoder.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free