title: File operation in android
body: <p>I am new to android platform. I need to create a text file in android. Please let me know how to perform this task in android. I have written a code that is working fine in java but not in android. Please help me on this....the sample code that ihave written is :-</p>
  
  <pre><code>try
  {
  DataOutputStream   dos = new DataOutputStream(new FileOutputStream("test.txt", true));
  dos.writeBytes(dataLine);
  dos.close();
  } 
  catch (FileNotFoundException ex) {}
  </code></pre>
  
  <p>the above code snippet is working fine in java but not in android :(</p>
  
  <p>Thanks,
  Ashish </p>