code: public static HtmlStreamRenderer create(
        @WillCloseWhenClosed Appendable output,
        Handler<? super IOException> ioExHandler,
        Handler<? super String> badHtmlHandler) {
      if (output instanceof Closeable) {
        return new CloseableHtmlStreamRenderer(
            output, ioExHandler, badHtmlHandler);
      } else if (AutoCloseableHtmlStreamRenderer.isAutoCloseable(output)) {
        return AutoCloseableHtmlStreamRenderer.createAutoCloseableHtmlStreamRenderer(
            output, ioExHandler, badHtmlHandler);
      } else {
        return new HtmlStreamRenderer(output, ioExHandler, badHtmlHandler);
      }
    }
docs: Factory.
  @param output the buffer to which HTML is streamed.
  @param ioExHandler called with any exception raised by output.
  @param badHtmlHandler receives alerts when HTML cannot be rendered because
  there is not valid HTML tree that results from that series of calls.
  E.g. it is not possible to create an HTML {@code <style>} element whose
  textual content is {@code "</style>"}.