A
ak
Hi, I need to create RandomAccessFile for file which is in JAR. Is it
possible?
possible?
ak said:Hi, I need to create RandomAccessFile for file which is in JAR. Is it
possible?
ak said:Hi, I need to create RandomAccessFile for file which is in JAR. Is it
possible?
Hmm, I don't want to change anything. Just create RandomAccessFile.Michael Borgwardt said:No. The compression makes local changes impossible.
ak said:That simple, i wrote RandomAccessByteArray (which extends
RandomAccessFile) - so I can read byte array as RandomAccessFile.
Constructor of RandomAccessFile needs valid File.
I used before some temporary file. But this approach dont work if my
programm runs in applet.
Michael Borgwardt said:And you thought you could put it in the applet's own JAR???
That's even more impossible.
Do you actually need *random* access? Or just the readXX methods?
In the latter case, a DataInputStream wrapped around a ByteArrayInputStream
offers the same.
ak said:Yes, I really need *random* access.
Michael Borgwardt said:Then I think the best method would be to implement the methods from
RandomAccessFile that you need yourself to work directly on a byte
array. Shouldn't be too difficult.
Hi, I need to create RandomAccessFile for file which is in JAR. Is it
possible?
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.