title: MODE_PRIVATE cannot be resolved to a variable in openFileOutput
body: <p>I am trying to save html file. I have class which extends AsyncTask</p>
  
  <pre><code>public class DownloadBook extends AsyncTask&lt;String, Void, String&gt; {
  </code></pre>
  
  <p>Inside this class, I have this method:</p>
  
  <pre><code>private void writeFile(String result, String title) throws FileNotFoundException {
          FileOutputStream fos = openFileOutput(title+".html", MODE_PRIVATE);
          PrintWriter pw = new PrintWriter(new BufferedWriter(
                  new OutputStreamWriter(fos)));
          pw.print(result);
          pw.close();
      }
  </code></pre>
  
  <p>MODE_PRIVATE is giving following error: </p>
  
  <blockquote>
    <p>MODE_PRIVATE cannot be resolved to a variable</p>
  </blockquote>
  
  <p>Then I changed it to <strong>Context.MODE_PRIVATE</strong>. Now openFileOutput is giving this error: </p>
  
  <blockquote>
    <p>The method openFileOutput(String, int) is undefined for the type
    DownloadBook</p>
  </blockquote>
  
  <p>How to solve this problem?</p>