Here you can find the source of clone(byte[] array)
public static byte[] clone(byte[] array)
//package com.java2s; public class Main { public static byte[] clone(byte[] array) { if (array == null) { return null; }//from w w w . ja va 2 s. c o m byte[] result = new byte[array.length]; System.arraycopy(array, 0, result, 0, array.length); return result; } }