What is the easy way to concatenate two byte arrays?
byte
Say,
byte a[]; byte b[];
How do I concatenate two byte
Most straightforward:
byte[] c = new byte[a.length + b.length]; System.arraycopy(a, 0, c, 0, a.length); System.arraycopy(b, 0, c, a.length, b.length);