code: @Override
      public int read(char[] cbuf, int start, int len) throws IOException
      {
          // Let's first ensure there's enough room...
          if (start < 0 || (start+len) > cbuf.length) {
              reportBounds(cbuf, start, len);
          }
          // Already EOF?
          if (mByteBuffer == null) {
              return -1;
          }
          if (len < 1) {
              return 0;
          }
  
          // Need to load more data?
          int avail = mByteBufferEnd - mBytePtr;
          if (avail <= 0) {
              mCharCount += mByteBufferEnd;
              // Let's always try to read full buffers, actually...
              int count = readBytes();
              if (count <= 0) {
                  if (count == 0) {
                      reportStrangeStream();
                  }
                  /* Let's actually then free the buffer right away; shouldn't
                   * yet close the underlying stream though?
                   */
                  freeBuffers(); // to help GC?
                  return -1;
              }
              avail = count;
          }
  
          // K, have at least one byte == char, good enough:
  
          if (len > avail) {
              len = avail;
          }
          int i = mBytePtr;
          int last = i + len;
  
          for (; i < last; ) {
              char c = (char) mByteBuffer[i++];
              if (c >= CHAR_DEL) {
                  if (c > CHAR_DEL) {
                      reportInvalidAscii(c);
                  } else {
                      if (mXml11) {
                          int pos = mCharCount + mBytePtr;
                          reportInvalidXml11(c, pos, pos);
                      }
                  }
              }
              cbuf[start++] = c;
          }
  
          mBytePtr = last;
          return len;
      }
docs: /*
  //////////////////////////////////////
  Public API
  //////////////////////////////////////