Android Byte Array Concatenate concat(int[] base, int... extension)

Here you can find the source of concat(int[] base, int... extension)

Description

concat

Declaration

public static int[] concat(int[] base, int... extension) 

Method Source Code

//package com.java2s;

public class Main {
    public static int[] concat(int[] base, int... extension) {
        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);//from   w w w .  j a v a 2  s. c o m
        return compound;
    }

    public static byte[] concat(byte[] base, byte... extension) {
        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;
    }
}

Related

  1. concat(byte[] a, byte[] b)
  2. concat(byte[] base, byte... extension)
  3. concatByteArray(byte[] a, byte[] b)
  4. copyBytesIntoByteArray(byte[] dest, byte[] src)
  5. copyBytesIntoByteArrayAtOffset(byte[] dest, byte[] src, int offset)
  6. copyBytesIntoByteArrayUpToLength(byte[] dest, byte[] src, int offset)