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