Here you can find the source of appendToArray(final File[] original, final File[] toAppend)
synchronized static File[] appendToArray(final File[] original, final File[] toAppend)
//package com.java2s; //License from project: Open Source License import java.io.File; import java.util.Vector; public class Main { synchronized static File[] appendToArray(final File[] original, final File[] toAppend) { Vector<File> toReturn = new Vector<File>(); for (int i = 0; i < original.length; i++) { File file = original[i]; toReturn.add(file);//from ww w.java2s .c om } for (int i = 0; i < toAppend.length; i++) { File file = toAppend[i]; toReturn.add(file); } return toReturn.toArray(new File[toReturn.size()]); } }