Java 5 API compatibility.