I want to send an file over a tcp socket with base64. But when I do readAll I receive it in multiple strings.
I know that there are a lot of topics about this but what is the best way to receive the complete data?
Also I want to know what the best way is to send an file, with the file I also have to send some data(String). Thats the reason I use base64.

Does someone has an example of how I can receive complete data?