title: Read file of content-disposition with java
body: <p>I am developing a web-app that needs to query an ontology through a REST-API. 
  If I call the API through the browser, it opens a pop-up "Save As" through which I can save the file. 
  This is because the header of the response contains: </p>
  
  <pre><code>Content-Disposition: attachment; filename = query-result.srx
  </code></pre>
  
  <p>The problem is that I would like to receive the file within my web-app without using the browser.
  The web-app is write on java and I use Apache HttpClient for send and receive, HTTP request and response:</p>
  
  <pre><code>CloseableHttpClient httpClient = HttpClients.createDefault();
  HttpGet httpGet = new HttpGet(uri);
  CloseableHttpResponse httpResponse = httpClient.execute(httpGet);
  </code></pre>
  
  <p>If I try to get the entity's content:</p>
  
  <pre><code>httpResponse.getEntity().getContent()
  </code></pre>
  
  <p>It return a useless value.</p>
  
  <p>It 's something that you can do with this library, or should I use another library.</p>
  
  <p>I found another question similar to mine but no one answered.</p>
  
  <p><a href="https://stackoverflow.com/questions/22175946/java-javascript-read-content-disposition-file-content">java-javascript-read-content-disposition-file-content</a></p>
  
  <p>Thanks to all who answer me!</p>