Here you can find the source of appendArrays(byte[] in1, byte[] in2)
Parameter | Description |
---|---|
in1 | non-null array |
in2 | non-null array |
public static byte[] appendArrays(byte[] in1, byte[] in2)
//package com.java2s; //License from project: Apache License public class Main { /**// w w w . j a v a2 s . c om * append two arrays * @param in1 non-null array * @param in2 non-null array * @return array of members oa 1 then members of 2 */ public static byte[] appendArrays(byte[] in1, byte[] in2) { byte[] ret = new byte[in1.length + in2.length]; System.arraycopy(in1, 0, ret, 0, in1.length); System.arraycopy(in2, 0, ret, in1.length, in2.length); return ret; } /** * append two arrays * @param in1 non-null array * @param in2 non-null array * @return array of members oa 1 then members of 2 */ public static int[] appendArrays(int[] in1, int[] in2) { int[] ret = new int[in1.length + in2.length]; System.arraycopy(in1, 0, ret, 0, in1.length); System.arraycopy(in2, 0, ret, in1.length, in2.length); return ret; } /** * append two arrays * @param in1 non-null array * @param in2 non-null array * @return array of members oa 1 then members of 2 */ public static char[] appendArrays(char[] in1, char[] in2) { char[] ret = new char[in1.length + in2.length]; System.arraycopy(in1, 0, ret, 0, in1.length); System.arraycopy(in2, 0, ret, in1.length, in2.length); return ret; } /** * append two arrays * @param in1 non-null array * @param in2 non-null array * @return array of members oa 1 then members of 2 */ public static double[] appendArrays(double[] in1, double[] in2) { double[] ret = new double[in1.length + in2.length]; System.arraycopy(in1, 0, ret, 0, in1.length); System.arraycopy(in2, 0, ret, in1.length, in2.length); return ret; } }