code: public static boolean compareMagics (byte[] magic1,byte[] magic2) {
  	if (magic1.length!=magic2.length) {
  		return false;
  	}
  	for (int i=0;i<magic1.length;i++) {
  		if (magic1[i]!=magic2[i]) {
  			 return false;
  		}
  	}
  	return true;	
  
  }
docs: Compares two Bitcoin magics
  
  @param magic1 first magic
  @param magic2 second magics
  
  @return false, if do not match, true if match