I want to hook the method System.out.print in Java and have the ability to read/change the variables used in the method before the part of the method is called that actually add
Since JDK 1.1, the System.setOut
and System.setErr
methods are added to enable applications to hook the streams.
Link : http://docs.oracle.com/javase/7/docs/api/java/lang/System.html#setOut(java.io.PrintStream)
http://docs.oracle.com/javase/7/docs/api/java/lang/System.html#setErr(java.io.PrintStream)