Java tutorial
//package com.java2s; /*************************************************************************** * Copyright (C) 2001, Patrick Charles and Jonas Lehmann * * Distributed under the Mozilla Public License * * http://www.mozilla.org/NPL/MPL-1.1.txt * ***************************************************************************/ public class Main { /** * Join two arrays. */ public static byte[] join(byte[] a, byte[] b) { byte[] bytes = new byte[a.length + b.length]; System.arraycopy(a, 0, bytes, 0, a.length); System.arraycopy(b, 0, bytes, a.length, b.length); return bytes; } }