There is an exact question in the exam scam book from B.Brogden. Here is his explanation: "....there is no way to create a RandonAccessFile from a URL. The basic reason is that there is no protocol for random access to files via HTTP."
posted 17 years ago
I don't think this is a correct reason. A URL may not necessarily use HTTP. The reason you cannot have random access to a URL is: There is no concept of a "File Pointer" that you can move around in a URL. All you have is a stream of data. You do not have a "chunk" of data. Furthermore, you can have random access only if you have all the data buffered so that you can move the File Pointer around in that buffer.