Android Utililty Methods Byte Array Merge

List of utility methods to do Byte Array Merge

Description

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

Method

byte[]concat(byte[] b1, byte[] b2)
concat
byte[] b3 = new byte[b1.length + b2.length];
System.arraycopy(b1, 0, b3, 0, b1.length);
System.arraycopy(b2, 0, b3, b1.length, b2.length);
return b3;
byte[]byteMerge(byte[][] inp)
byte Merge
int length = 0;
if (inp == null)
    return null;
for (int inx = 0; inx < inp.length; inx++) {
    if (inp[inx] == null)
        return null;
    length += inp[inx].length;
int position = 0;
byte[] merge = new byte[length];
for (int inx = 0; inx < inp.length; inx++) {
    for (int jnx = 0; jnx < inp[inx].length; jnx++) {
        merge[position++] = inp[inx][jnx];
return merge;
byte[]byteMerger(byte[] byte_1, byte[] byte_2)
byte Merger
byte[] byte_3 = new byte[byte_1.length + byte_2.length];
System.arraycopy(byte_1, 0, byte_3, 0, byte_1.length);
System.arraycopy(byte_2, 0, byte_3, byte_1.length, byte_2.length);
return byte_3;