I have a servlet which is able to receive binary data [files].
I would like to use Spring's RestTemplate() to upload a large binary file to the servlet. However its not possible to load the binary file entirely into memory.
So far my attempts have resulted in OutOfMemory errors, indicating the methods have been attempting to load the entire file into memory.
How can I stream this binary data to the servlet? Preferable in Spring or otherwise in Java.