Java Utililty Methods Array Copy

List of utility methods to do Array Copy

Description

The list of methods to do Array Copy are organized into topic(s).

Method

boolean[]copy(final boolean[] array)
Creates a new copy of the given array.
if (array == null) {
    return null;
} else {
    return Arrays.copyOf(array, array.length);
byte[]copy(final byte[] bytes)
Copia un array de bytes devolviendo un array igual.
return bytes != null ? Arrays.copyOf(bytes, bytes.length) : null;
byte[]copy(final byte[] inBytes)
TODO
if (inBytes == null) {
    return null;
} else {
    return Arrays.copyOf(inBytes, inBytes.length);
int[]copy(int[] array)
Copies the given array into a new one.
int[] newInt = new int[array.length];
System.arraycopy(array, 0, newInt, 0, array.length);
return newInt;
int[]copy(int[] array)
Returns a deep copy of the input array .
return Arrays.copyOf(array, array.length);
int[][]copy(int[][] input)
copy
int[][] target = new int[input.length][];
for (int i = 0; i < input.length; i++) {
    target[i] = Arrays.copyOf(input[i], input[i].length);
return target;
long[]copy(long[] array)
copy
if (array == null) {
    return null;
if (array.length == 0) {
    return array;
return Arrays.copyOf(array, array.length);
long[]copy(long[] v)
Copy a bitset
return Arrays.copyOf(v, v.length);
T[]copy(T[] array)
copy
return Arrays.copyOf(array, array.length);
T[]copy(T[] array)
Allocation space and copy
return copy(array, 0, array.length);