Read file and then jump to end
<p>I want to read the text file and after that get the offset to which file is read.I tried the following program but the thing is i dont want to use RandomAccessFile,how can i do that.</p>

<pre><code>RandomAccessFile access = null;
                try {
                    access = new RandomAccessFile(file, "r");

                    if (file.length() &lt; addFileLen) {
                        access.seek(file.length());
                    } else {
                        access.seek(addFileLen);
                    }
                } catch (Exception e) {
                    e.printStackTrace();
                }
                String line = null;
                try {

                    while ((line = access.readLine()) != null) {

                        System.out.println(line);
                        addFileLen = file.length();

                    }
</code></pre>
