docs: public void copyToResponse(HttpServletResponse response, byte[] alteredResponse) throws IOException {
          // character encoding
          if(this.characterEncoding != null) {
              response.setCharacterEncoding(this.characterEncoding);
          }
  
          // charset
          if(this.charset != null) {
              response.setCharacterEncoding(charset);
          }
  
          // content type
          if(this.contentType != null) {
              response.setContentType(this.contentType);
          }
  
          // set the status
          if(this.statusCode > 0) {
              response.setStatus(this.statusCode);
          }
  
          // set the locale
          if(this.locale != null) {
              response.setLocale(this.locale);
          }
  
          // copy and add all cookies
          if(this.cookies != null) {
              for(Cookie cookie : this.cookies) {
                  response.addCookie(cookie);
              }
          }
  
          // copy the byte array stream and also set its length
          final OutputStream finalOut = response.getOutputStream();
          if(alteredResponse == null) {
              int length = this.outputStream.getLength();
              response.setContentLength(length);
  
              // write the entire byte chunk
              this.outputStream.getByteArrayOutputStream().writeTo(finalOut);
          } else {
              response.setContentLength(alteredResponse.length);
              finalOut.write(alteredResponse);
          }
  
          finalOut.flush();
      }