Java 7 method. Not available in Java 6.