use of com.googlecode.d2j.smali.BaksmaliDumpOut in project dex2jar by pxb1988.
the class DexWaveTest method toStd.
public static String toStd(DexClassNode expected) throws IOException {
StringWriter stringWriter = new StringWriter();
BufferedWriter bufferedWriter = new BufferedWriter(stringWriter);
BaksmaliDumpOut out = new BaksmaliDumpOut(bufferedWriter);
final BaksmaliDumper bs = new BaksmaliDumper(true, false);
bs.baksmaliClass(expected, out);
bufferedWriter.close();
return stringWriter.toString();
}
use of com.googlecode.d2j.smali.BaksmaliDumpOut in project dex2jar by pxb1988.
the class SmaliTest method test.
@Test
public void test() throws IOException {
DexFileNode dfn = new DexFileNode();
Smali.smaliFile(new File("src/test/resources/a.smali").toPath(), dfn);
for (DexClassNode dcn : dfn.clzs) {
BufferedWriter w = new BufferedWriter(new OutputStreamWriter(System.out));
new BaksmaliDumper(true, true).baksmaliClass(dcn, new BaksmaliDumpOut(w));
w.flush();
}
}
use of com.googlecode.d2j.smali.BaksmaliDumpOut in project dex2jar by pxb1988.
the class SmaliTest method pbaksmali.
private static String pbaksmali(DexClassNode dcn) throws IOException {
StringWriter bufWriter = new StringWriter();
BufferedWriter w = new BufferedWriter(bufWriter);
new BaksmaliDumper(true, true).baksmaliClass(dcn, new BaksmaliDumpOut(w));
w.flush();
bufWriter.flush();
return bufWriter.toString();
}
Aggregations