Here you can find the source of arraybyteappend(byte[] array, byte[] append, int size)
public static byte[] arraybyteappend(byte[] array, byte[] append, int size)
//package com.java2s; public class Main { public static byte[] arraybyteappend(byte[] array, byte[] append) { return arraybyteappend(array, append, append.length); }/*from w w w . j a v a 2 s . c o m*/ public static byte[] arraybyteappend(byte[] array, byte[] append, int size) { array = arraybyteexpend(array, size); System.arraycopy(append, 0, array, array.length - size, size); return array; } public static byte[] arraybyteexpend(byte[] array, int increment) { System.arraycopy(array, 0, array = new byte[array.length + increment], 0, array.length - increment); return array; } }