Back to my page
soot.SootClass c = // your SootClass
PrintWriter writer = new PrintWriter(System.out);
soot.Printer.v().printTo(c, writer);
writer.flush();
writer.close();
soot.Body c = // your method Body
PrintWriter writer = new PrintWriter(System.out);
soot.Printer.v().printTo(c, writer);
writer.flush();
writer.close();
soot.SootClass c = // your SootClass
File file = new File(c.getName() + ".jimple");
PrintWriter writer;
try {
writer = new PrintWriter(file);
soot.Printer.v().printTo(c, writer);
writer.flush();
writer.close();
} catch (FileNotFoundException e) {
e.printStackTrace();
}