Examples of JasminOutputStream


Examples of soot.util.JasminOutputStream

                                    System.getProperty("file.separator")
                                            .toCharArray()[0]) + ".class");

            _create(tempFile.getAbsoluteFile());

            OutputStream streamOut = new JasminOutputStream(
                    new FileOutputStream(tempFile));

            PrintWriter writerOut = new PrintWriter(new OutputStreamWriter(
                    streamOut));

            if (cl.containsBafBody()) {
                new soot.baf.JasminClass(cl).print(writerOut);
            } else {
                new soot.jimple.JasminClass(cl).print(writerOut);
            }

            writerOut.flush();
            streamOut.close();

        } catch (IOException e) {
            e.printStackTrace();
            throw new RuntimeException("Could not produce new classfile! (" + e
                    + ")");
View Full Code Here

Examples of soot.util.JasminOutputStream

    PrintWriter writer = null;
    SootClass c = Scene.v().getSootClass(cls);
    List<String> before_sigs = getMethodSignatures(c);
    try {
      fos = new FileOutputStream(filename);
      out1 = new JasminOutputStream(fos);
      writer = new PrintWriter(new OutputStreamWriter(out1));
      new soot.jimple.JasminClass(c).print(writer);
    } catch(Exception ex){
      System.out.println("Error writing .class: "+cls);
      ex.printStackTrace(System.out);
View Full Code Here

Examples of soot.util.JasminOutputStream

            stdout_pw.flush();
          }

          String name = klass.getName();
          ByteArrayOutputStream baos = new ByteArrayOutputStream();
          PrintWriter pw = new PrintWriter(new JasminOutputStream(baos));
          new JasminClass(klass).print(pw);
          pw.flush();
          loader.addClass(name, baos.toByteArray());
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.