Useful stuff for Java 1.6+.