E
Eric Capps
Hi,
My subject basically says it all: I'm writing a Java applet that, among
other things, needs to read the last line of a rather large file.
RandomAccessFile has been suggested to me, however, I can't get it to
work with files over the web (for example:
r = new RandomAccessFile("http://mysite.com/whatever.dat");
fails.
My questions are:
1) SHOULD RandomAccessFile be able to work for a file on the internet?
My guess is no.
2) I am currently trying (unsuccesfully) to use the BufferedReader class
and the skip(long n) method to implement this. Does this method operate
in constant or linear time? I can't afford to have it read through the
entire file when it skips characters.
3) Can anyone offer any general advice as to how to approach this
problem? I can't download the entire fire or move through it linearly; I
CAN write my own random access I/O class if necessary and possible.
-Eric
My subject basically says it all: I'm writing a Java applet that, among
other things, needs to read the last line of a rather large file.
RandomAccessFile has been suggested to me, however, I can't get it to
work with files over the web (for example:
r = new RandomAccessFile("http://mysite.com/whatever.dat");
fails.
My questions are:
1) SHOULD RandomAccessFile be able to work for a file on the internet?
My guess is no.
2) I am currently trying (unsuccesfully) to use the BufferedReader class
and the skip(long n) method to implement this. Does this method operate
in constant or linear time? I can't afford to have it read through the
entire file when it skips characters.
3) Can anyone offer any general advice as to how to approach this
problem? I can't download the entire fire or move through it linearly; I
CAN write my own random access I/O class if necessary and possible.
-Eric