private static byte[] concatBytes(byte[] array1,byte[] array2){
  byte[] cBytes=new byte[array1.length + array2.length];
  try {
    System.arraycopy(array1,0,cBytes,0,array1.length);
    System.arraycopy(array2,0,cBytes,array1.length,array2.length);
  }
 catch (  Exception e) {
    throw new RuntimeException(e);
  }
  return cBytes;
}

private static byte [ ] concatBytes ( byte [ ] array1 , byte [ ] array2 ) { byte [ ] cBytes = new byte [ array1 . length + array2 . length ] ; try { System . arraycopy ( array1 , 0 , cBytes , 0 , array1 . length ) ; System . arraycopy ( array2 , 0 , cBytes , array1 . length , array2 . length ) ; } catch ( Exception e ) { throw new RuntimeException ( e ) ; } return cBytes ; }
this method concatenates two byte arrays
