Trouble with reading file
<p>In my app I have to set one password from a settings page and write it to a file, After that when i enter into the home page i have to read that file if the file is null i have to enter to the settinngs page,</p>

<p>The code used for it is.....</p>

<pre><code>   try {
              System.out.println("Enter try block!!!");
                FileInputStream fis = openFileInput(FILENAME1);
                InputStreamReader in = new InputStreamReader(fis);
                BufferedReader br = new BufferedReader(in);
                data = br.readLine();
                System.out.println("data from settings file"+data);
                System.out.println("-------1Data Read From File is:1" + data);
               if(data.equals(null))
                {
                    Toast.makeText(getApplicationContext(), "You have to set a password", Toast.LENGTH_SHORT).show();
                    Intent in1 = new Intent();
                    in1.setClass(getApplicationContext(), SetteingsPage.class);
                    startActivity(in1);
                }
            } catch (Exception e) { 

            }
</code></pre>

<p>If the password is already set,Then the code is working properly..But if it is null it is not entering into settings class...</p>
