elect
10/18/2023, 7:57 AMseek to a specific location, however I get
java.lang.ArrayIndexOutOfBoundsException: offset=25403 > size=7365I guess because the 8k segment just run out However, if I try instead to consume bytes infinitely, I can consume around 4.7MB before I reach the end of the file (
java.io.EOFException)
So, is the seek just for segments? How can I seek for positions outside the current segment?elect
10/18/2023, 8:26 AMFileHandle?elect
10/18/2023, 8:30 AMFileHandle looks what I needed, but I need to jump forth and back from FileHandle and BufferedSource..Filipp Zhinkin
10/18/2023, 11:17 AMsize=7365
It refers to the size of a buffer, not a particular segment.
You can try calling `request`/`require` on a source before using seek to ensure that enough data were buffered.