replaced use of Arrays.copyOf for Java 1.5 compatibility
Merge pull request #759 from adam-beneschan/master

replaced use of Arrays.copyOf for Java 1.5 compatibility