final void endLogRequestAndResponse(@Nullable Throwable cause) {
        if (cause != null) {
            logBuilder().endRequest(cause);
            logBuilder().endResponse(cause);
        } else {
            logBuilder().endRequest();
            logBuilder().endResponse();
        }
    }
Writes the {@link AggregatedHttpResponse} to the {@link Channel}.
Note that the caller has to flush the written data when needed.
core/src/main/java/com/linecorp/armeria/server/AbstractHttpResponseHandler.java