Android Utililty Methods Byte Array Concatenate

List of utility methods to do Byte Array Concatenate

Description

The list of methods to do Byte Array Concatenate are organized into topic(s).

Method

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;
voidcopyBytesIntoByteArray(byte[] dest, byte[] src)
copy Bytes Into Byte Array
copyBytesIntoByteArrayAtOffset(dest, src, 0);
voidcopyBytesIntoByteArrayAtOffset(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];
voidcopyBytesIntoByteArrayUpToLength(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];