Java Array Merge mergeArray(byte[] arr1, byte[] arr2)

Here you can find the source of mergeArray(byte[] arr1, byte[] arr2)

Description

merge Array

License

Open Source License

Declaration

public static byte[] mergeArray(byte[] arr1, byte[] arr2) 

Method Source Code

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

public class Main {
    public static byte[] mergeArray(byte[] arr1, byte[] arr2) {
        byte[] result = new byte[arr1.length + arr2.length];

        for (int i = 0; i < arr1.length; i++)
            result[i] = arr1[i];/* w ww . j  a v a2s.c  o m*/

        for (int i = 0; i < arr2.length; i++)
            result[i + arr1.length] = arr2[i];

        return result;
    }
}

Related

  1. merge(T[]... arrays)
  2. merge(T[]... many)
  3. merge2TablesWithoutDup(String[] t1, String[] t2)
  4. mergeAndOrderArray(int[] arrA, int[] arrB)
  5. mergeArgs(String[] args)
  6. mergeArray(final Object[] dest, final Object[]... arrays)
  7. mergeArray(String[] a, String[] b)
  8. mergeArray(T[] objs, String concatenator)
  9. mergeArrayIntoString(final Object[] array, String middleDelimiter, String lastDelimiter)