List of utility methods to do Array Concatenate
byte[] | append(byte[] pck1, byte[] pck2) Append two byte arrays. byte packet[] = new byte[pck1.length + pck2.length]; for (int i = 0; i < pck1.length; i++) packet[i] = pck1[i]; for (int i = 0; i < pck2.length; i++) packet[i + pck1.length] = pck2[i]; return packet; |
byte[] | addBytes(byte[] src1, byte[] src2) add Bytes byte[] dest = new byte[src1.length + src2.length]; System.arraycopy(src1, 0, dest, 0, src1.length); System.arraycopy(src2, 0, dest, src1.length, src2.length); return dest; |