Home / Type/ ChunkedInput Type — netty Architecture

ChunkedInput Type — netty Architecture

Architecture documentation for the ChunkedInput type/interface in ChunkedInput.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  dcf58d5b_93ae_ab06_97b4_c905882e488e["ChunkedInput"]
  184742e9_4257_25f5_4258_f9d4b343c815["ChunkedInput.java"]
  dcf58d5b_93ae_ab06_97b4_c905882e488e -->|defined in| 184742e9_4257_25f5_4258_f9d4b343c815
  style dcf58d5b_93ae_ab06_97b4_c905882e488e fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

handler/src/main/java/io/netty/handler/stream/ChunkedInput.java lines 25–81

public interface ChunkedInput<B> {

    /**
     * Return {@code true} if and only if there is no data left in the stream
     * and the stream has reached at its end.
     */
    boolean isEndOfInput() throws Exception;

    /**
     * Releases the resources associated with the input.
     */
    void close() throws Exception;

    /**
     * @deprecated Use {@link #readChunk(ByteBufAllocator)}.
     *
     * <p>Fetches a chunked data from the stream. Once this method returns the last chunk
     * and thus the stream has reached at its end, any subsequent {@link #isEndOfInput()}
     * call must return {@code true}.
     *
     * @param ctx The context which provides a {@link ByteBufAllocator} if buffer allocation is necessary.
     * @return the fetched chunk.
     *         {@code null} if there is no data left in the stream.
     *         Please note that {@code null} does not necessarily mean that the
     *         stream has reached at its end.  In a slow stream, the next chunk
     *         might be unavailable just momentarily.
     */
    @Deprecated
    B readChunk(ChannelHandlerContext ctx) throws Exception;

    /**
     * Fetches a chunked data from the stream. Once this method returns the last chunk
     * and thus the stream has reached at its end, any subsequent {@link #isEndOfInput()}
     * call must return {@code true}.
     *
     * @param allocator {@link ByteBufAllocator} if buffer allocation is necessary.
     * @return the fetched chunk.
     *         {@code null} if there is no data left in the stream.
     *         Please note that {@code null} does not necessarily mean that the
     *         stream has reached at its end.  In a slow stream, the next chunk
     *         might be unavailable just momentarily.
     */
    B readChunk(ByteBufAllocator allocator) throws Exception;

    /**
     * Returns the length of the input.
     * @return  the length of the input if the length of the input is known.
     *          a negative value if the length of the input is unknown.
     */
    long length();

    /**
     * Returns current transfer progress.
     */
    long progress();

}

Frequently Asked Questions

What is the ChunkedInput type?
ChunkedInput is a type/interface in the netty codebase, defined in handler/src/main/java/io/netty/handler/stream/ChunkedInput.java.
Where is ChunkedInput defined?
ChunkedInput is defined in handler/src/main/java/io/netty/handler/stream/ChunkedInput.java at line 25.

Analyze Your Own Codebase

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

Try Supermodel Free