docs: public void transferResponse(HttpServletResponse target) throws IOException // never
    // called
    // for
    // ARD.
    // would
    // be
    // in
    // trouble
    // with
    // a
    // bunch
    // of
    // include
    // warnings
    {
      _finish();
  
      if (containsError())
      {
        // transfer error
        String message = getErrorMessage();
        int sc = getErrorStatusCode();
        if (message == null)
        {
          target.sendError(sc);
        }
        else
        {
          target.sendError(sc, message);
        }
      }
      else if (isRedirected())
      {
        // transfer cookies
        Cookie[] cookies = getCookies();
        for (int i = 0; i < cookies.length; i++)
        {
          target.addCookie(cookies[i]);
        }
  
        // transfer redirect
        target.sendRedirect(getRedirectURI());
      }
      else
      {
        // transfer status code
        if (getStatusMessage() == null)
        {
          target.setStatus(getStatusCode());
        }
        else
        {
          target.setStatus(getStatusCode(), getStatusMessage());
        }
  
        // transfer headers
        _header.transferHeader(target);
  
        // transfer cookies
        Cookie[] cookies = getCookies();
        for (int i = 0; i < cookies.length; i++)
        {
          target.addCookie(cookies[i]);
        }
  
        if (this.getOutputBuffer() != null)
        { // PM17019
          // transfer data
          ServletOutputStream out;
          try
          {
            out = target.getOutputStream();
          }
          catch (IllegalStateException i)
          {
            while (!(target instanceof StoredResponse))
            {
              while (target instanceof HttpServletResponseWrapper)
              {
                target = ((HttpServletResponse) ((HttpServletResponseWrapper) target).getResponse());
              }
  
              while (target instanceof HttpServletResponseProxy)
              {
                target = ((HttpServletResponse) ((HttpServletResponseProxy) target).getProxiedHttpServletResponse());
              }
  
              while (target instanceof IncludedResponse)
              {
                target = ((IncludedResponse) target).getProxiedHttpServletResponse();
              }
  
              // PQ88880 begin
              if (target instanceof SRTServletResponse)
              {
                target.getWriter().write(this.getOutputBufferAsString().toCharArray());
                return;
              }
              // PQ88880 end
            }
  
            StoredResponse s = (StoredResponse) target;
  
            out = s._outInternal;
          }
  
          out.write(this.getOutputBuffer());
        }
      }
    }