TestChunkedInput Class — netty Architecture
Architecture documentation for the TestChunkedInput class in ChunkedWriteHandlerTest.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD ce85c7b2_e98b_84e8_74f4_da02f5709274["TestChunkedInput"] ef80ca88_d081_0f32_4668_0c2eea409d9e["ChunkedWriteHandlerTest.java"] ce85c7b2_e98b_84e8_74f4_da02f5709274 -->|defined in| ef80ca88_d081_0f32_4668_0c2eea409d9e 5a87f9ac_5ede_1dc1_7d58_9144f33b262c["TestChunkedInput()"] ce85c7b2_e98b_84e8_74f4_da02f5709274 -->|method| 5a87f9ac_5ede_1dc1_7d58_9144f33b262c a3ae28ff_0e32_363b_e2ed_3dd7d96e444d["isEndOfInput()"] ce85c7b2_e98b_84e8_74f4_da02f5709274 -->|method| a3ae28ff_0e32_363b_e2ed_3dd7d96e444d 5b3c7cbd_194c_150b_fe10_1fdfe7748566["close()"] ce85c7b2_e98b_84e8_74f4_da02f5709274 -->|method| 5b3c7cbd_194c_150b_fe10_1fdfe7748566 697e3e48_87b2_725e_81bd_ea478de212e9["ByteBuf()"] ce85c7b2_e98b_84e8_74f4_da02f5709274 -->|method| 697e3e48_87b2_725e_81bd_ea478de212e9 065d12a2_1432_c5fd_404a_8b3282ea3171["length()"] ce85c7b2_e98b_84e8_74f4_da02f5709274 -->|method| 065d12a2_1432_c5fd_404a_8b3282ea3171 a977f573_a177_e786_c51c_5e5a05d2b25e["progress()"] ce85c7b2_e98b_84e8_74f4_da02f5709274 -->|method| a977f573_a177_e786_c51c_5e5a05d2b25e 6abd9734_226e_eb7a_6ea3_c933dfb7e8bf["isClosed()"] ce85c7b2_e98b_84e8_74f4_da02f5709274 -->|method| 6abd9734_226e_eb7a_6ea3_c933dfb7e8bf
Relationship Graph
Source Code
handler/src/test/java/io/netty/handler/stream/ChunkedWriteHandlerTest.java lines 738–784
private static final class TestChunkedInput implements ChunkedInput<ByteBuf> {
private final int chunksToProduce;
private int chunksProduced;
private volatile boolean closed;
TestChunkedInput(int chunksToProduce) {
this.chunksToProduce = chunksToProduce;
}
@Override
public boolean isEndOfInput() {
return chunksProduced >= chunksToProduce;
}
@Override
public void close() {
closed = true;
}
@Override
public ByteBuf readChunk(ChannelHandlerContext ctx) {
return readChunk(ctx.alloc());
}
@Override
public ByteBuf readChunk(ByteBufAllocator allocator) {
ByteBuf buf = allocator.buffer();
buf.writeInt(chunksProduced);
chunksProduced++;
return buf;
}
@Override
public long length() {
return chunksToProduce;
}
@Override
public long progress() {
return chunksProduced;
}
boolean isClosed() {
return closed;
}
}
Source
Frequently Asked Questions
What is the TestChunkedInput class?
TestChunkedInput is a class in the netty codebase, defined in handler/src/test/java/io/netty/handler/stream/ChunkedWriteHandlerTest.java.
Where is TestChunkedInput defined?
TestChunkedInput is defined in handler/src/test/java/io/netty/handler/stream/ChunkedWriteHandlerTest.java at line 738.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free