code: private static int readLen(ByteBuffer buffer) {
          int len = 0;
          int i = Buffers.readUByte(buffer);
          if ((i & 0x80) != 0) {
              //read one more byte.
              len |= (i & 0x7f) << 8;
              len += Buffers.readUByte(buffer);
          } else {
              len = i;
          }
          return len;
      }
docs: read encoding len.
  see StringPool.cpp ENCODE_LENGTH