title: Android: FileOutputStream, write to beginning (top) of file
body: <p>Is there an easy way to write to the top of a file with FileOutputStream?</p>
  
  <p>This option</p>
  
  <pre><code>FileOutputStream fos = openFileOutput("Activity.log", Context.MODE_APPEND);
  </code></pre>
  
  <p>appends to the file (writes to the end). But I cannot find an "automatic" option to write to the beginning of the file instead. Is there one, or do I have to take it down a notch and calculate the start and end indexes etc. and write "bit for bit"?</p>