title: Read and Append data to the File from a Blob URL path before download
body: <p>This is my first hands on using Java Spring boot in a project, as I have mostly used C# and I have a requirement of reading a file from a blob URL path and appending some string data(like a key) to the same file in the stream before my API downloads the file. </p>
  
  <p>Here are the ways that I have tried to do it:</p>
  
  <ol>
  <li><strong>FileOutputStream/InputStream</strong>: This throws a FileNotfoundException as it is not able to resolve the blob path.</li>
  <li><p><strong>URLConnection</strong>: This got me somewhere and I was able to download the file successfully but when I tried to write/append some value to the file before I download, I failed. </p>
  
  <p>the code I have been doing.</p>
  
  <pre><code>    //EXTERNAL_FILE_PATH is the azure storage path ending with for e.g. *.txt
      URL urlPath = new URL(EXTERNAL_FILE_PATH);
      URLConnection connection = urlPath.openConnection();
      connection.setDoOutput(true); //I am doing this as I need to append some data and the docs mention to set this flag to true. 
      OutputStreamWriter out = new OutputStreamWriter(connection.getOutputStream());
      out.write("I have added this");
      out.close();
  
  
      //this is where the issues exists as the error throws saying it cannot read data as the output is set to true and it can only write and no read operation is allowed. So, I get a 405, Method not allowed...
      inputStream = connection.getInputStream(); 
  </code></pre></li>
  </ol>
  
  <p>I am not sure if the framework allows me to modify some file in the URL path and read it simultaneously and download the same.</p>
  
  <p>Please help me in understanding if they is a better way possible here. </p>