Java Array Clone clone(byte[][] im)

Here you can find the source of clone(byte[][] im)

Description

clone

License

Apache License

Declaration

public static byte[][] clone(byte[][] im) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

public class Main {
    public static byte[][] clone(byte[][] im) {
        byte[][] clone = new byte[im.length][im[0].length];

        copy(clone, im);//from  w w  w .  j ava  2  s .  co  m

        return clone;
    }

    public static void copy(byte[][] target, byte[][] src) {

        for (int y = 0; y < target.length; y++) {
            for (int x = 0; x < target[0].length; x++) {
                target[y][x] = src[y][x];
            }
        }
    }
}

Related

  1. clone(boolean[] array)
  2. clone(boolean[] array)
  3. clone(boolean[] in)
  4. clone(byte[] input)
  5. clone(byte[] orig)
  6. clone(double[] array)
  7. clone(double[] p)
  8. clone(double[][] source)
  9. clone(final byte[] array)