readAheadLimit

Hi

In the mark(readAheadLimit) method, API says reading past this limit will not guarantee a correct reset(). I wonder:

1) Why have such a limit at all?

2) How "dangerous" is it to read past this limit reagarding reset()?

If one has a very large file, one may end up with a very large readAheadLimit, which I believe is not really ideal.

HMS

[378 byte] By [herreminsjela] at [2007-10-3 4:03:39]
# 1

1.) Probably because some implementations need a buffer to store already-read data and this is used to limit the size of this buffer.

2.) You simply have no guarantee that you will be able to call reset() and have it work correctly if you read past that amount of data. It might work, but it might not work.

JoachimSauera at 2007-7-14 22:02:41 > top of Java-index,Java Essentials,Java Programming...