title: Writing/Reading Files to/from Android phone's internal memory
body: <p>I have an utility class named 'MyClass'.  The class has two methods to read/write some data into phone's internal memory.  I am new to android, Please follow below code.</p>
  
  <pre><code>public class MyClass  {
    public void ConfWrite() {
      try {
        BufferedWriter bufferedWriter = new BufferedWriter(new FileWriter(new 
                             File(getFilesDir()+File.separator+"MyFile.txt")));
        bufferedWriter.write("lalit poptani");
        bufferedWriter.close();
      } catch (Exception e1) {
          e1.printStackTrace();
      }
    }
  }
  </code></pre>
  
  <p>while executing ConfWrite method, it fails</p>
  
  <p>please provide a better solution to solve this</p>
  
  <p>thanks in advance</p>