private ChannelFuture doWriteSplitData(int id, HttpData data, boolean endStream) {
        try {
            int offset = 0;
            int remaining = data.length();
            ChannelFuture lastFuture;
            for (;;) {
                // Ensure an HttpContent does not exceed the maximum length of a cleartext TLS record.
                final int chunkSize = Math.min(MAX_TLS_DATA_LENGTH, remaining);
                lastFuture = write(id, new DefaultHttpContent(toByteBuf(data, offset, chunkSize)), false);
                remaining -= chunkSize;
                if (remaining == 0) {
                    break;
                }
                offset += chunkSize;
            }

            if (endStream) {
                lastFuture = write(id, LastHttpContent.EMPTY_LAST_CONTENT, true);
            }

            ch.flush();
            return lastFuture;
        } finally {
            data.close();
        }
    }
The map which maps a request ID to its related pending response.
core/src/main/java/com/linecorp/armeria/internal/common/Http1ObjectEncoder.java