code: public static int utf2chars(byte[] src, int sindex,
                                  char[] dst, int dindex,
                                  int len) {
          int i = sindex;
          int j = dindex;
          int limit = sindex + len;
          while (i < limit) {
              int b = src[i++] & 0xFF;
              if (b >= 0xE0) {
                  b = (b & 0x0F) << 12;
                  b = b | (src[i++] & 0x3F) << 6;
                  b = b | (src[i++] & 0x3F);
              } else if (b >= 0xC0) {
                  b = (b & 0x1F) << 6;
                  b = b | (src[i++] & 0x3F);
              }
              dst[j++] = (char)b;
          }
          return j;
      }
docs: Convert `len' bytes from utf8 to characters.
  Parameters are as in System.arraycopy
  Return first index in `dst' past the last copied char.
  @param src        The array holding the bytes to convert.
  @param sindex     The start index from which bytes are converted.
  @param dst        The array holding the converted characters..
  @param dindex     The start index from which converted characters
  are written.
  @param len        The maximum number of bytes to convert.