7 ms·
> some clever applet-writer realized that you could change them and start intercepting all output and do all sorts of nasty stuff. Can someone explain how this
by bobbyi 16y ago
> some clever applet-writer realized that you could change them and start intercepting all output and do all sorts of nasty stuff.
Can someone explain how this worked? What does he mean by "intercepting all output"?
- btilly 16y agoReplace System.out with an object that responds to all of the same methods, but which does something clever with them. For instance one that adds timestamps on output, logs stuff somewhere, filters, etc. This is a very powerful trick. However the downside is that it is in the category of things where only one person gets to be clever. Because the second person to replace that object breaks the first. So they decided to discourage that.