D
Derek Clarkson
Hi all,
Our company uses a courier company to deliver our product to clients. So we
can monitor the status of deliveries I've written a program to screen scrap
the courier companies online tracking system (web based).
This works fine, except if I run it over night. when I come in the next
morning I typically find the program stopped, waiting for a reply from the
web server.
I'm guess that either their system, or our ISP has a temporary interuption
of service some time late at night and that causes either the program to
loose contact with the web server or the reply by the web server to be
"lost".
I would like to add a timeout to the code which reads data from the HTML
stream coming from the web server, but I can't see how to do it. I'm using
the following to get a reader with which I get data from the web server:
return new InputStreamReader(objURLConnect.getInputStream());
Any ideas ?
Our company uses a courier company to deliver our product to clients. So we
can monitor the status of deliveries I've written a program to screen scrap
the courier companies online tracking system (web based).
This works fine, except if I run it over night. when I come in the next
morning I typically find the program stopped, waiting for a reply from the
web server.
I'm guess that either their system, or our ISP has a temporary interuption
of service some time late at night and that causes either the program to
loose contact with the web server or the reply by the web server to be
"lost".
I would like to add a timeout to the code which reads data from the HTML
stream coming from the web server, but I can't see how to do it. I'm using
the following to get a reader with which I get data from the web server:
return new InputStreamReader(objURLConnect.getInputStream());
Any ideas ?