title: How do you open a FileOutpuStream to a File created by registerForActivityResult with Intent.ACTION_CREATE_DOCUMENT
body: <p>I'm using Kotlin to create a Program, that takes the Data inside a Database and exports it to a File, using gson.
  The File is created using the File-Chooser-Activity and i plan to use mainly use the Download-Folder, although the User should be able to choose any folder regardless
  I plan to use a forEach-Loop to write the Data into the File. Sadly, I struggle with creating a FileOutputStream from the returning Intent.  So how do I go from</p>
  <pre><code>val resultData: Intent? = result.data
  </code></pre>
  <p>to</p>
  <pre><code>val outputstream = FileOutputStream(filename,true)
  </code></pre>
  <p>or</p>
  <pre><code>val outputstream = FileOutputStream(file:File,true)
  </code></pre>
  <p>Also, I would appreaceate it, if somebody could explain to me the difference between OutputStream and FileOutputStream.
  From what I've gathered, Outputstream is just an Abstract, typeless version of FileOutputStream.</p>