Have you already a socket server ?
If this is the case, for a binary file, you can open the file with a FileInputStream on the server, then send it with a socket with a BufferedOutpuStream to the client.
The client will receive the data with a BufferedInputStream.
You just have to go to the api specification to see how those classes work.
If you don't have a server, search on this forum, there is plenty of examples and tutorials.