private void rotateDexFile() { if (outputDex != null) { if (dexOutPool != null) { dexOutputFutures.add(dexOutPool.submit(new DexWriter(outputDex))); } else { dexOutputArrays.add(writeDex(outputDex)); } } createDexFile(); }
private void rotateDexFile() { if (outputDex != null) { if (dexOutPool != null) { dexOutputFutures.add(dexOutPool.submit(new DexWriter(outputDex))); } else { dexOutputArrays.add(writeDex(outputDex)); } } createDexFile(); }
private static void createDexFile() { if (outputDex != null) { dexOutputArrays.add(writeDex()); } outputDex = new DexFile(args.dexOptions); if (args.dumpWidth != 0) { outputDex.setDumpWidth(args.dumpWidth); } }
/** * Run and return a result code. * @param arguments the data + parameters for the conversion * @return 0 if success > 0 otherwise. */ public static int run(Arguments arguments) { // Reset the error/warning count to start fresh. warnings = 0; errors = 0; args = arguments; args.makeCfOptions(); if (!processAllFiles()) { return 1; } byte[] outArray = writeDex(); if (outArray == null) { return 2; } if (args.jarOutput) { // Effectively free up the (often massive) DexFile memory. outputDex = null; if (!createJar(args.outName, outArray)) { return 3; } } return 0; }
dexOutputArrays.add(writeDex());
private int runMonoDex() throws IOException { if (!processAllFiles()) { return 1; } // this array is null if no classes were defined byte[] outArray = null; if (!outputDex.isEmpty() || (args.humanOutName != null)) { outArray = writeDex(outputDex); if (outArray == null) { return 2; } } if (args.jarOutput) { // Effectively free up the (often massive) DexFile memory. outputDex = null; if (outArray != null) { outputResources.put(DexFormat.DEX_IN_JAR_NAME, outArray); } if (!createJar(args.outName)) { return 3; } } else if (outArray != null && args.outName != null) { OutputStream out = openOutput(args.outName); out.write(outArray); closeOutput(out); } return 0; }
outArray = writeDex();
outArray = writeDex(outputDex);
outArray = writeDex(outputDex);
outArray = writeDex();