title: how to set pdf file path to download the file from server
body: <p>I want to download the pdf from my server, the path for the file I get from API response is like : E:\C1MS\REPORTS\003315150418.pdf</p>
  
  <p>But, how can I download this file by giving my server's ip?</p>
  
  <p>The path for server is : <a href="http://103.91.100.17:8080/creditOneFuelOneApp/" rel="nofollow noreferrer">http://103.91.100.17:8080/creditOneFuelOneApp/</a></p>
  
  <p>code to download the file </p>
  
  <pre><code>public static void DownloadFile(String fileURL, File directory) {
      try {
  
          FileOutputStream f = new FileOutputStream(directory);
          URL u = new URL(fileURL);
          HttpURLConnection c = (HttpURLConnection) u.openConnection();
          c.setRequestMethod("GET");
          c.setDoOutput(true);
          c.connect();
  
          InputStream in = c.getInputStream();
  
          byte[] buffer = new byte[1024];
          int len1 = 0;
          while ((len1 = in.read(buffer)) &gt; 0) {
              f.write(buffer, 0, len1);
          }
          f.close();
      } catch (Exception e) {
          e.printStackTrace();
      }
  
  }
  </code></pre>
  
  <p>EDIT :</p>
  
  <p><a href="http://103.91.100.17:8080/creditOneFuelOneApp/statement" rel="nofollow noreferrer">http://103.91.100.17:8080/creditOneFuelOneApp/statement</a></p>
  
  <p>request</p>
  
  <pre><code>    {
  "account_number" : "000584",
  "user_type" : "C"
  }
  </code></pre>
  
  <p>response</p>
  
  <pre><code>{
      "response_code": 0,
      "bill_due_date": "05-Jun-18",
      "last_bill_date": "01-Jun-18",
      "response_desc": "Success",
      "account_name": "Credit One",
      "last_bill_amount": "35083.00",
      "statement_list": [
          {
              "bill_amount": "35083.00",
              "file_location": "",
              "bill_date": "01-Jun-18",
              "due_date": "05-Jun-18"
          },
          {
              "bill_amount": "35083.00",
              "file_location": "E:\\C1MS\\REPORTS\\000584180501.pdf",
              "bill_date": "16-May-18",
              "due_date": "20-May-18"
          },
          {
              "bill_amount": "30083.00",
              "file_location": "E:\\C1MS\\REPORTS\\000584180401.pdf",
              "bill_date": "01-May-18",
              "due_date": "05-May-18"
          },
  ]
  </code></pre>
  
  <p>Please help. Thank you.</p>