title: How to write CSV file on azure file storage account using java?
body: <p>The way we create CSV file to specified path on our system like in one drive and some folder path we use FileWriter specifying filePath while creating FileWriter object. Similary how can we create CSV file in azure file storage using java?</p>
  
  <p>I am working on spring mvc hibernate application where I need to read the data from SQL server and write that data to csv file and place that file to a location.
  That code is already there. But I need to write this data to a azure file storage location now. Let say this is the code</p>
  
  <pre><code>    String csvFile = "/Users/amar/csv/developer.csv";
      FileWriter writer = new FileWriter(csvFile);
  
      List&lt;Developer&gt; developers = Arrays.asList(
              new Developer("amar", new BigDecimal(120500), 32),
              new Developer("zilap", new BigDecimal(150099), 5),
              new Developer("ultraman", new BigDecimal(99999), 99)
      );
  
      //for header
      CSVUtils.writeLine(writer, Arrays.asList("Name", "Salary", "Age"));
  
      for (Developer d : developers) {
  
          List&lt;String&gt; list = new ArrayList&lt;&gt;();
          list.add(d.getName());
          list.add(d.getSalary().toString());
          list.add(String.valueOf(d.getAge()));
  
          CSVUtils.writeLine(writer, list);
  
          //try custom separator and quote.
          //CSVUtils.writeLine(writer, list, '|', '\"');
      }
  
      writer.flush();
      writer.close();
  </code></pre>
  
  <p>now instead of <code>writer.flush()</code> I want to do something like</p>
  
  <pre><code>CloudFileDirectory sampleDir = rootDir.getDirectoryReference(path); 
  
  cloudFile = sampleDir.getFileReference("csvfile.csv");
  cloudFile.write(csvfile);
  </code></pre>
  
  <p>something like this.</p>
  
  <p>so my question is what is the replacement of csv filewriter in azure api for java.</p>