Frequently used utility code for Java.