Java Binary File Compare and Copy Question

I am new to this so please be gentle. I have an interesting question that I am not sure there is an answer for.

I am trying to develop code to compare binary files across the internet. If they are different I want to be able to only send the changes across the internet.

I figured I can use something like MD5 to quickly see if they are the same, but I am not sure how I can compare and copy only the changes across the internet.

Any suggestions would be appreciated. It is a real brain teaser.