docs: public final PrintWriter getWriter() throws IOException {
          if (out == null) {
              // NOTE: getCharacterEncoding may/should not return null
              OutputStream out = createOutputStream();
              String charEncoding = response.getCharacterEncoding();
              this.out = new PrintWriter(charEncoding != null ? new OutputStreamWriter(out, charEncoding) : new OutputStreamWriter(out));
          }
          else if (out instanceof ServletOutputStream) {
              throw new IllegalStateException("getOutputStream() already called.");
          }
  
          return (PrintWriter) out;
      }