Well the (private) RandomAccessFile.openCheck()
method (in Harvest / Android) simply checks that the file is currently open. If it throws an IOException
, that means you've closed the RandomAccessFile
object.
Lesson: If you get an exception that you don't expect / don't understand:
- Read the exception message1.
- Look at the stack trace to see where the exception is thrown.
- Find the source code. (Google usually works for me ...)
- Look at the source code to see why it is thrown.
1 - It doesn't help in this case, because for some bizarre reason they throw IOException
with no message. Its a BUG in my opinion.
Reference: