fetching the last line from the server using android
<p>I want to download only the last line displayed on the server to my android device. Can you please tell me the process or give a basic idea. I am trying to download files and then compare. But cant we do by just fetching the last line.</p>

<pre><code>                   try { 
                    BufferedReader br1 = new BufferedReader(new FileReader(file1));
                    BufferedReader br2 = new BufferedReader(new FileReader(file2));


                    String strLine1, strLine2;
                    boolean isSame = true;
                    StringBuilder finalText = new StringBuilder();
                    strLine1 = br1.readLine();
                    strLine2 = br2.readLine();
                    if (strLine1.equals(strLine2))
                        Toast.makeText(getBaseContext(), strLine2,
                                Toast.LENGTH_LONG).show();
                    else {
                        isSame = false;
                        Toast.makeText(getBaseContext(), strLine1,
                                Toast.LENGTH_LONG).show();
                        tv.setText(finalText.toString());


                    }
                }finally{
                }
</code></pre>
