title: how to read line by line in android?
body: <p>i am using this code.</p>
  
  <pre><code>try{
            // Open the file that is the first 
            // command line parameter
            FileInputStream fstream = new FileInputStream("config.txt");
            // Get the object of DataInputStream
            DataInputStream in = new DataInputStream(fstream);
            BufferedReader br = new BufferedReader(new InputStreamReader(in));
            while ((br.readLine()) != null) {
                temp1 = br.readLine();
                temp2 = br.readLine();
  
            }
  
            in.close();
      }catch (Exception e){//Catch exception if any
      Toast.makeText(getBaseContext(), "Exception", Toast.LENGTH_LONG).show();
      }
      Toast.makeText(getBaseContext(), temp1+temp2, Toast.LENGTH_LONG).show();
  </code></pre>
  
  <p>but this is showing exception and is not updating temp1 and temp2.</p>