code: private int skipCoalescedText(int i)
          throws XMLStreamException
      {
          while (true) {
              // Ok, plain text or markup?
              if (i == '<') { // markup, maybe CDATA?
                  // Need to distinguish "<![" from other tags/directives
                  if (!ensureInput(3)) {
                      /* Most likely an error condition, but let's leave
                       * it up for other parts of code to complain.
                       */
                      return i;
                  }
                  if (mInputBuffer[mInputPtr] != '!'
                      || mInputBuffer[mInputPtr+1] != '[') {
                      // Nah, some other tag or directive
                      return i;
                  }
                  // Let's skip beginning parts, then:
                  mInputPtr += 2;
                  // And verify we get proper CDATA directive
                  checkCData();
                  skipCommentOrCData(SUFFIX_IN_CDATA, ']', false);
                  i = getNext();
              } else if (i < 0) { // eof
                  return i;
              } else { // nah, normal text, gotta skip
                  i = skipTokenText(i);
                  /* Did we hit an unexpandable entity? If so, need to
                   * return ampersand to the caller...
                   * (and same for EOF too)
                   */
                  if (i == '&' || i < 0) {
                      return i;
                  }
              }
          }
      }
docs: Method called to skip past all following text and CDATA segments,
  until encountering something else (including a general entity,
  which may in turn expand to text).
  
  @return Character following all the skipped text and CDATA segments,
  if any; or -1 to denote EOF