public static HttpResponse fromStream(ResponseHeaders headers,
                                          Stream<? extends ServerSentEvent> contentStream,
                                          HttpHeaders trailers, Executor executor) {
        requireNonNull(headers, "headers");
        requireNonNull(contentStream, "contentStream");
        requireNonNull(trailers, "trailers");
        requireNonNull(executor, "executor");
        return streamingFrom(contentStream, sanitizeHeaders(headers), trailers,
                             ServerSentEvents::toHttpData, executor);
    }
Creates a new Server-Sent Events stream from the specified {@link Stream}.

@param headers the HTTP headers supposed to send
@param contentStream the {@link Stream} which publishes the objects supposed to send as contents
@param trailers the HTTP trailers
@param executor the executor which iterates the stream
core/src/main/java/com/linecorp/armeria/server/streaming/ServerSentEvents.java