How to implement RandomAccessFile's seek() and getFilePointer() using FileInputStream and BufferReader?

The BufferedReader reads ahead,so the position on the underlying file > the logical position the BufferedReader has reached. You could try DataInputStream.readLine(), which doesn't, and which is deprecated, and which doesn't handle the issues mentioned in the Javadoc against the deprecation.

This seems like a reasonable workaround and since it's on DataInput, that means RandomAccessFile itself could still be used. :) – Trejkaz Dec 6 at 23:33.

If you must do it this way, you can use the BufferedReader. Skip method to skip characters (having kept a count of the number of chars already read). But if possible, I'd suggest to just keep the same BufferedReader around (without closing it), so that it's automatically in the right place in any case.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions