how to make readLine() of Filereader to go to previous location
<p>I am creating one text file which will connected to some server.
this text file will receive its contents from the server.
It will receive the some text data continuously.</p>

<p>To limit the file size , I am checking no.of lines in the file and if exceeds the mark I am clearing file content. Server will write from the beginning.</p>

<p>Below is the code I have used to do this :</p>

<pre><code>LineNumberReader myReader = new LineNumberReader( new FileReader(new File("mnt/sdcard/abc.txt")));
while(true) {   

    while(myReader.readLine() != null) {
        counter ++;
    }

    if(counter &gt; 100 ) {

        PrintWriter writer = new PrintWriter("/mnt/sdcard/abc.txt");
                    writer.print("");
                    writer.close();
                    writer = null;
        counter = 0;
    }

}
</code></pre>

<p>But after I clear the contents in a file my "counter"  not increasing.
But my file is having some data.
I think after reading done I have set my "myReader" to some intial..?
If its how to set that to initial so that .readLine() should start from begining.</p>
