Java Array Add addArrayToArray(byte[] baseArray, int startIndex, byte[] newArray)

Here you can find the source of addArrayToArray(byte[] baseArray, int startIndex, byte[] newArray)

Description

add Array To Array

License

Open Source License

Declaration

static public boolean addArrayToArray(byte[] baseArray, int startIndex, byte[] newArray) 

Method Source Code

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

public class Main {
    static public boolean addArrayToArray(byte[] baseArray, int startIndex, byte[] newArray) {

        if (startIndex + newArray.length > baseArray.length)
            return false;

        for (int i = 0; i < newArray.length; i++)
            baseArray[startIndex + i] = newArray[i];

        return true;
    }/* w  w  w . ja v a  2 s .c om*/
}

Related

  1. addArrayElements(byte[] toArray, byte[] fromArray)
  2. addArrays(final int[] a, final int[] b)
  3. addArrays(float[] arr1, float[] arr2, float[] arr3)
  4. addArrays(Object[] array1, Object[] array2)
  5. addArrays(String[] a, String[] b)