Java Array Concatenate arrayConcat(final byte[] firstArray, final byte[] secondArray)

Here you can find the source of arrayConcat(final byte[] firstArray, final byte[] secondArray)

Description

array Concat

License

Open Source License

Declaration

public static byte[] arrayConcat(final byte[] firstArray, final byte[] secondArray) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

public class Main {
    public static byte[] arrayConcat(final byte[] firstArray, final byte[] secondArray) {
        final int aLen = firstArray.length;
        final int bLen = secondArray.length;
        final byte[] combinedArray = new byte[aLen + bLen];
        System.arraycopy(firstArray, 0, combinedArray, 0, aLen);
        System.arraycopy(secondArray, 0, combinedArray, aLen, bLen);
        return combinedArray;
    }/*from w ww  . ja v  a  2 s . co  m*/
}

Related

  1. arraycat(String[][] array1, String[][] array2)
  2. arrayConcat(byte[] a, byte[] b)
  3. arrayConcat(String[] first, String second)
  4. arrayConcat(T[] a, T[] b)
  5. arrayConcat(T[] first, T[] second)
  6. arrayConcat(T[] first, T[] second)