private void printMap() {
    for (TableOfContents.Section section : tableOfContents.sections) {
      if (section.off != -1) {
        System.out.println(
            "section "
                + Integer.toHexString(section.type)
                + " off="
                + Integer.toHexString(section.off)
                + " size="
                + Integer.toHexString(section.size)
                + " byteCount="
                + Integer.toHexString(section.byteCount));
      }
    }
  }
Executable that prints all indices of a dex file.
android/android_framework/dex-maker/src/main/java/com/android/dx/io/DexIndexPrinter.java