code: public static void emit(Reader src, boolean escapeXml, JspWriter out) throws IOException {
          int bufferSize = out.getBufferSize();
          if (bufferSize == 0) {
              bufferSize = 4096;
          }
          char[] buffer = new char[bufferSize];
          int count;
          while ((count = src.read(buffer)) > 0) {
              if (escapeXml) {
                  emit(buffer, 0, count, out);
              } else {
                  out.write(buffer, 0, count);
              }
          }
      }
docs: Copy the content of a Reader into the specified JSPWriter escaping characters if needed.
  
  @param src       the Reader to read from
  @param escapeXml if true, escape characters
  @param out       the JspWriter to emit to
  @throws IOException if there was a problem emitting the content