I have a BufferedReader wrapped on a file, I want to mark a place and use reset() later to get back to this position. I have read the java api, it states mark (readlimit), when
large but not as large as file
This is the problem. Make it as large, or larger. You can't reset further back than the mark quantum.
But you shouldn't have to re-read files at all, this is poor design and poor programming. Compilers can compile programs by only reading source files once, and compilation is a lot more complex than any process you have to carry out.