title: How do I set file permission to MODE_WORLD_READABLE
body: <p>I am downloading an audio file to my Android application's cache that must then be accessed with MediaPlayer.  The file gets created with permissions of -rw------- (as seen in Eclipse's File Explorer).</p>
  
  <p>With these permissions, the MediaPlayer cannot access the audio file.  Failure is shown in logcat as:</p>
  
  <pre><code>java.io.IOException: Prepare failed.: status=0x1
  </code></pre>
  
  <p>My app targets API level 8.</p>
  
  <p>How do I set the downloaded audio file's permissions to make it readable by the MediaPlayer?</p>
  
  <p>By the way, I am creating the file with:</p>
  
  <pre><code>FileOutputStream out = new FileOutputStream(fRecording);
  </code></pre>
  
  <p>When I try to create the file as MODE_WORLD_READABLE, no file is created:</p>
  
  <pre><code>FileOutputStream out = activity.openFileOutput(fRecording.getAbsolutePath(), Activity.MODE_WORLD_READABLE);
  </code></pre>
  
  <p>The logcat error using openFileOutput is:</p>
  
  <pre><code>java.lang.IllegalArgumentException: File /data/data/com.calltrunk.android/cache/727adda7-0ef1-490f-9853-fe13ad1e9416 contains a path separator
  </code></pre>