Here you can find the source of mergeBytearrays(byte[] ret, byte[] header, byte[] body)
public static byte[] mergeBytearrays(byte[] ret, byte[] header, byte[] body)
//package com.java2s; //License from project: Apache License public class Main { public static byte[] mergeBytearrays(byte[] ret, byte[] header, byte[] body) { System.arraycopy(header, 0, ret, 0, header.length); System.arraycopy(body, 0, ret, header.length, body.length); return ret; }//w w w.ja va 2s . c o m }