code: @Override
      public int nextCodePoint() {
          int ch1 = next();
          if (UTF16.isLeadSurrogate((char) ch1)) {
              int ch2 = next();
              if (UTF16.isTrailSurrogate((char) ch2)) {
                  return Character.toCodePoint((char) ch1, (char) ch2);
              } else if (ch2 != DONE) {
                  // unmatched surrogate so back out
                  previous();
              }
          }
          return ch1;
      }
docs: Returns the code point at index, and increments to the next code point (post-increment semantics). If index does
  not point to a valid surrogate pair, the behavior is the same as <code>next()</code>. Otherwise the iterator is
  incremented past the surrogate pair, and the code point represented by the pair is returned.
  
  @return the next codepoint in text, or DONE if the index is at the limit of the text.