public String readString() {
      int offset = readInt();
      int savedPosition = data.position();
      int savedLimit = data.limit();
      data.position(offset);
      data.limit(data.capacity());
      try {
        int expectedLength = readUleb128();
        String result = Mutf8.decode(this, new char[expectedLength]);
        if (result.length() != expectedLength) {
          throw new DexException(
              "Declared length "
                  + expectedLength
                  + " doesn't match decoded length of "
                  + result.length());
        }
        return result;
      } catch (UTFDataFormatException e) {
        throw new DexException(e);
      } finally {
        data.position(savedPosition);
        data.limit(savedLimit);
      }
    }
Look up a descriptor index from a type index. Cheaper than: {@code
open(tableOfContents.typeIds.off + (index * SizeOf.TYPE_ID_ITEM)).readInt();}
android/android_framework/dex-maker/src/main/java/com/android/dex/Dex.java