Thursday, August 9, 2001 09:25 AM
You know what, your answer is in the javadoc of the java.io.RandomAccessFile class:
It is generally true of all the reading routines in this class that if end-of-file is reached before the desired number of bytes has been read, an EOFException (which is a kind of IOException) is thrown. If any byte cannot be read for any reason other than end-of-file, an IOException other than EOFException is thrown. In particular, an IOException may be thrown if the stream has been closed.