title: Upload large binary file to using Java Spring RestTemplate
body: <p>I have a servlet which is able to receive binary data [files].</p>
  
  <p>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.</p>
  
  <p>So far my attempts have resulted in OutOfMemory errors, indicating the methods have been attempting to load the entire file into memory.</p>
  
  <p>How can I stream this binary data to the servlet? Preferable in Spring or otherwise in Java.</p>