title: How to output text to a file in resource folder Maven
body: <p>Here is the structure of my maven project:  </p>
  
  <p>main and test folders are under src folder, java and resources folders are under main folder, 
  in the resources folder, there is a csv file ready for reading.</p>
  
  <pre><code>src  
    --main  
      |-- java  
      |-- resources  
             |-- test.csv
  test  
  </code></pre>
  
  <p>Currently, I am trying to overwrite the test.csv file using supercsv library.  </p>
  
  <p>I know that <code>public CsvMapWriter(Writer writer, CsvPreference preference)</code> method is helpful on that.  </p>
  
  <p>So, I am trying to use OutputStreamWriter, but how to access that file like using:  </p>
  
  <pre><code> InputStreamReader reader = new InputStreamReader(getClass().getClassLoader().getResourceAsStream("acacia_implexa.csv"));
   mapReader = new CsvMapReader(reader, CsvPreference.STANDARD_PREFERENCE);
  </code></pre>