Code example for PrintWriter

Methods: flush, write

0
        getMethodVisitor().visitCode(); 
    } 
     
    public void end() { 
        if (DEBUG) {
            PrintWriter pw = new PrintWriter(System.out);
            String className = "(unknown class)";
            if (cv instanceof ClassWriter) {
                className = new ClassReader(((ClassWriter)cv).toByteArray()).getClassName();
            } 
            if (name != null) {
                pw.write("*** Dumping " + className + "." + name + " ***\n");
            } else { 
                pw.write("*** Dumping ***\n");
            } 
            printer.print(pw);
            pw.flush();
        } 
        getMethodVisitor().visitMaxs(1, 1); 
        getMethodVisitor().visitEnd(); 
    }