class Response implements PrometheusHttpResponse {

        private final HttpServletResponse response;

        /**
         * Constructs a new Response with the given HttpServletResponse.
         *
         * @param response the HttpServletResponse to be adapted
         */
        public Response(HttpServletResponse response) {
            this.response = response;
        }


        @Override
        public void setHeader(String name, String value) {
            response.setHeader(name, value);
        }


        @Override
        public OutputStream sendHeadersAndGetBody(int statusCode, int contentLength) throws IOException {<FILL_FUNCTION_BODY>}
    }

            if (response.getHeader("Content-Length") == null && contentLength > 0) {
                response.setContentLength(contentLength);
            }
            response.setStatus(statusCode);
            return response.getOutputStream();
        
<no_super_class>