title: How to read file from phone's internal memory in android?
body: <p>I have downloaded a file from <code>HttpConnection</code> using the <code>FileOutputStream</code> in android and now its being written in phone's internal memory on path as i found it in <code>File Explorer</code></p>
  
  <p><code>/data/data/com.example.packagename/files/123.ics</code></p>
  
  <p>Now, I want to open &amp; read the file content from phone's internal memory to UI. I tried to do it by using the <code>FileInputStream</code>, I have given just filename with extension to open it but I am not sure how to mention the file path for file in internal memory,as it forces the application to close.</p>
  
  <p>Any suggestions? </p>
  
  <hr>
  
  <p>This is what I am doing:</p>
  
  <pre><code>try
  {               
    FileInputStream fileIn;       
    fileIn = openFileInput("123.ics");
    InputStream in = null;
    EditText Userid = (EditText) findViewById(R.id.user_id);
    byte[] buffer = new byte[1024];
    int len = 0;
    while ( (len = in.read(buffer)) &gt; 0 )         
    {     
       Userid.setText(fileIn.read(buffer, 0, len));
    }                    
    fileIn.close();                       
  } catch (FileNotFoundException e)
  {
     e.printStackTrace();
  }
  catch (IOException e)
  {   
      e.printStackTrace();
  }
  </code></pre>