private void request0(long n) {
        if (isDone()) {
            // The subscription has been closed. An additional request should be ignored.
            // https://github.com/reactive-streams/reactive-streams-jvm#3.6
            return;
        }

        if (n <= 0) {
            onError(new IllegalArgumentException(
                    "n: " + n + " (expected: > 0, see Reactive Streams specification rule 3.9)"));
            return;
        }

        final int size = size();
        if (fulfilled == size) {
            return;
        }

        final int oldDemand = demand;
        if (oldDemand >= size) {
            // Already enough demand to finish the stream so don't need to do anything.
            return;
        }

        // As size is fixed, we can safely cap the demand to it here.
        final int remaining = size - fulfilled;
        if (n >= remaining) {
            demand = remaining;
        } else {
            // As objs.length is an int, large demand will always fall into the above branch and there is no
            // chance of overflow, so just simply add the demand.
            demand = (int) Math.min(oldDemand + n, remaining);
        }

        if (inOnNext) {
            return;
        }

        for (;;) {
            if (cancelled) {
                return;
            }

            while (demand > 0 && fulfilled < size) {
                if (cancelled) {
                    return;
                }

                final T o = get(fulfilled++);
                inOnNext = true;
                demand--;
                try {
                    onNext(o);
                } finally {
                    inOnNext = false;
                }
            }

            if (fulfilled == size) {
                onComplete();
                return;
            }

            if (demand == 0) {
                return;
            }
        }
    }
A {@link FixedStreamMessage} that publishes an arbitrary number of objects. It is recommended to use
{@link EmptyFixedStreamMessage}, {@link OneElementFixedStreamMessage}, or
{@link TwoElementFixedStreamMessage} when publishing less than three objects.
core/src/main/java/com/linecorp/armeria/internal/common/stream/AbstractFixedStreamMessage.java