copyOfRange is not in Java 1.5