Posted By:
Michael_Berg
Posted On:
Tuesday, July 16, 2002 02:32 PM
This is my question: I have a large file on a remote unix box that needs to be read every 5 minutes. Using the following code it takes over 15 minutes: FtpClient fc; try { FtpClient client = new FtpClient(host2); client.login(username, password); client.cd(directory); InputStream is = client.get(filename); InputStreamReader isr = new InputStreamReader(is); BufferedReader in = new BufferedReader(isr); while((strLine = in.readLine()) != null) { pullOutTheExceptions(strLine, path); checkForErrors(strLine, path); } Instead of usi
More>>
This is my question:
I have a large file on a remote unix box that needs to be read every 5 minutes.
Using the following code it takes over 15 minutes:
FtpClient fc;
try {
FtpClient client = new FtpClient(host2);
client.login(username, password);
client.cd(directory);
InputStream is = client.get(filename);
InputStreamReader isr = new InputStreamReader(is);
BufferedReader in = new BufferedReader(isr);
while((strLine = in.readLine()) != null) {
pullOutTheExceptions(strLine, path);
checkForErrors(strLine, path);
}
Instead of using the BufferedReader class I need to be able to perform a seek() using the RandomAccessFile class to keep track of the position for the next time.
Can you help me!
<<Less