public static DecodedInstruction[] decodeAll(short[] encodedInstructions) {
    int size = encodedInstructions.length;
    DecodedInstruction[] decoded = new DecodedInstruction[size];
    ShortArrayCodeInput in = new ShortArrayCodeInput(encodedInstructions);

    try {
      while (in.hasMore()) {
        decoded[in.cursor()] = DecodedInstruction.decode(in);
      }
    } catch (EOFException ex) {
      throw new DexException(ex);
    }

    return decoded;
  }
Decodes an array of instructions. The result has non-null elements at each offset that
represents the start of an instruction.
android/android_framework/dex-maker/src/main/java/com/android/dx/io/instructions/DecodedInstruction.java