I want to seek in a file which is located on SDCARD (External Storage).
I opened it in read-only mode.
in = new RandomAccessFile(filePath, "r");
Everything for reading from this file stream is ok until i want to seek in file.
long seekPosition = 100;//sample value
in.seek(seekPosition);
the seek position of course is not bigger than file size and not negative.
however i face an exception whith no details.
here is exception trace:
java.io.IOException
at java.io.RandomAccessFile.openCheck(RandomAccessFile.java:258)
at java.io.RandomAccessFile.seek(RandomAccessFile.java:648)
....
The question is why this happens and how can i fix it?
Is it related to seek in file which is located on shared storage or i missed something in this process?
My main concern is to access file bytes in random access method.