Java File Append appendToArray(final File[] original, final File[] toAppend)

Here you can find the source of appendToArray(final File[] original, final File[] toAppend)

Description

append To Array

License

Open Source License

Declaration

synchronized static File[] appendToArray(final File[] original, final File[] toAppend) 

Method Source Code


//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()]);
    }
}

Related

  1. appendHex(A sb, byte[] array, int offset, int len, char sep)
  2. appendHexJavaScriptRepresentation(Appendable out, int codePoint)
  3. appendHexJavaScriptRepresentation(StringBuilder sb, char c)
  4. appendTo(String fileName, String str)
  5. appendTo(StringBuffer sb, CharSequence s)
  6. appendToCollection(final Vector original, final File[] toAppend)
  7. appendToFileName(File file, String str)
  8. appendToken(StringBuilder path, String token, boolean skipEmpty, boolean skipSeparator)
  9. appendToOutput(InputStream input, OutputStream output)