List of utility methods to do Byte Array Concatenate
byte[] | concat(byte[] a, byte[] b) Join two bytearrays byte[] result = new byte[a.length + b.length]; System.arraycopy(a, 0, result, 0, a.length); System.arraycopy(b, 0, result, a.length, b.length); return result; |
byte[] | concat(byte[] base, byte... extension) concat byte[] compound = new byte[base.length + extension.length]; System.arraycopy(base, 0, compound, 0, base.length); System.arraycopy(extension, 0, compound, base.length, extension.length); return compound; |
int[] | concat(int[] base, int... extension) concat int[] compound = new int[base.length + extension.length]; System.arraycopy(base, 0, compound, 0, base.length); System.arraycopy(extension, 0, compound, base.length, extension.length); return compound; |
byte[] | concatByteArray(byte[] a, byte[] b) Method Concatenates the specified byte[]. int aL = a.length; int bL = b.length; int len = aL + bL; byte[] c = new byte[len]; System.arraycopy(a, 0, c, 0, aL); System.arraycopy(b, 0, c, aL, bL); return c; |
void | copyBytesIntoByteArray(byte[] dest, byte[] src) copy Bytes Into Byte Array copyBytesIntoByteArrayAtOffset(dest, src, 0); |
void | copyBytesIntoByteArrayAtOffset(byte[] dest, byte[] src, int offset) copy Bytes Into Byte Array At Offset for (int i = 0; i < src.length; i++) { dest[offset + i] = src[i]; |
void | copyBytesIntoByteArrayUpToLength(byte[] dest, byte[] src, int offset) copy Bytes Into Byte Array Up To Length for (int i = 0; i < offset; i++) { dest[i] = src[i]; |