testConcatenatedStreamsReadFullyWhenFragmented() — netty Function Reference
Architecture documentation for the testConcatenatedStreamsReadFullyWhenFragmented() function in JdkZlibTest.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD af4e039c_7c6d_12dd_7310_abea446807e8["testConcatenatedStreamsReadFullyWhenFragmented()"] 4c83b538_e9fd_3b12_c32e_629bfd12e1ce["JdkZlibTest"] af4e039c_7c6d_12dd_7310_abea446807e8 -->|defined in| 4c83b538_e9fd_3b12_c32e_629bfd12e1ce style af4e039c_7c6d_12dd_7310_abea446807e8 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
codec-compression/src/test/java/io/netty/handler/codec/compression/JdkZlibTest.java lines 113–141
@Test
public void testConcatenatedStreamsReadFullyWhenFragmented() throws IOException {
EmbeddedChannel chDecoderGZip = new EmbeddedChannel(new JdkZlibDecoder(true, 0));
try (InputStream resourceAsStream = getClass().getResourceAsStream("/multiple.gz")) {
byte[] bytes = IOUtils.toByteArray(resourceAsStream);
// Let's feed the input byte by byte to simulate fragmentation.
ByteBuf buf = Unpooled.copiedBuffer(bytes);
boolean written = false;
while (buf.isReadable()) {
written |= chDecoderGZip.writeInbound(buf.readRetainedSlice(1));
}
buf.release();
assertTrue(written);
Queue<Object> messages = chDecoderGZip.inboundMessages();
assertEquals(2, messages.size());
for (String s : Arrays.asList("a", "b")) {
ByteBuf msg = (ByteBuf) messages.poll();
assertEquals(s, msg.toString(CharsetUtil.UTF_8));
ReferenceCountUtil.release(msg);
}
} finally {
assertFalse(chDecoderGZip.finish());
chDecoderGZip.close();
}
}
Domain
Subdomains
Source
Frequently Asked Questions
What does testConcatenatedStreamsReadFullyWhenFragmented() do?
testConcatenatedStreamsReadFullyWhenFragmented() is a function in the netty codebase, defined in codec-compression/src/test/java/io/netty/handler/codec/compression/JdkZlibTest.java.
Where is testConcatenatedStreamsReadFullyWhenFragmented() defined?
testConcatenatedStreamsReadFullyWhenFragmented() is defined in codec-compression/src/test/java/io/netty/handler/codec/compression/JdkZlibTest.java at line 113.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free