public static byte[] concat(byte[] b1,byte[] b2){
  byte[] out=new byte[b1.length + b2.length];
  System.arraycopy(b1,0,out,0,b1.length);
  System.arraycopy(b2,0,out,b1.length,b2.length);
  return out;
}

public static byte [ ] concat ( byte [ ] b1 , byte [ ] b2 ) { byte [ ] out = new byte [ b1 . length + b2 . length ] ; System . arraycopy ( b1 , 0 , out , 0 , b1 . length ) ; System . arraycopy ( b2 , 0 , out , b1 . length , b2 . length ) ; return out ; }
concatenates and returns the given byte arrays .
