java合并两个byte数组为一个
public static byte[] byteMerge(byte[] bt1, byte[] bt2) { byte[] bt3 = new byte[bt1.length + bt2.length]; System.arraycopy(bt1, 0, bt3, 0, bt1.length); System.arraycopy(bt2, 0, bt3, bt1.length, bt2.length); return bt3; }
public static byte[] byteMerge(byte[] bt1, byte[] bt2) { byte[] bt3 = new byte[bt1.length + bt2.length]; System.arraycopy(bt1, 0, bt3, 0, bt1.length); System.arraycopy(bt2, 0, bt3, bt1.length, bt2.length); return bt3; }