Common methods for sending multiple messages in one connection are
- sending the length of the message (here: file size), so the remote party knows when to stop reading by counting bytes
- signalling the end of data by sending a special string that the file cannot contain
You probably are better off with the first one.
Alternatively you could consider using zip file input and output streams; they can contain several independent file entries