private int[] transformCatchHandlers(IndexMap indexMap, Code.CatchHandler[] catchHandlers) {
    int baseOffset = codeOut.getPosition();
    codeOut.writeUleb128(catchHandlers.length);
    int[] offsets = new int[catchHandlers.length];
    for (int i = 0; i < catchHandlers.length; i++) {
      offsets[i] = codeOut.getPosition() - baseOffset;
      transformEncodedCatchHandler(catchHandlers[i], indexMap);
    }
    return offsets;
  }
Writes the catch handlers to {@code codeOut} and returns their indices.
android/android_framework/dex-maker/src/main/java/com/android/dx/merge/DexMerger.java