public static HttpResponseWriter aggregateFrom(Stream<?> stream,
                                                   ResponseHeaders headers, HttpHeaders trailers,
                                                   Function<Object, HttpData> contentConverter,
                                                   Executor executor) {
        requireNonNull(stream, "stream");
        requireNonNull(headers, "headers");
        requireNonNull(trailers, "trailers");
        requireNonNull(contentConverter, "contentConverter");
        requireNonNull(executor, "executor");

        return aggregateFrom(collectFrom(stream, executor), headers, trailers, contentConverter);
    }
Returns a new {@link HttpResponseWriter} which has a content converted from the collected objects.

@param stream a sequence of objects
@param headers to be written to the returned {@link HttpResponseWriter}
@param trailers to be written to the returned {@link HttpResponseWriter}
@param contentConverter converts the collected objects into a content of the response
@param executor executes the collecting job
core/src/main/java/com/linecorp/armeria/internal/server/ResponseConversionUtil.java