Improved compatibility with Java 1.6:

I removed a method that is only available for never versions of Java.