You can't. Well, not like you want.
One thing you could do is read it in a separate thread, then do a timed
join. If the join timed out, move on and let the thread fall off the
stack.
Jim
[EMAIL PROTECTED]
On Sat, 20 Mar 1999, ritchie turner wrote:
> Sorry, this is a bit of topic, but how can I set a timeout when I open a
> http URLs inputstream? If a website doesn't respond within x seconds
> then ignore it.
>
> Thx
>
> Ritchie
>
> ___________________________________________________________________________
> To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
> of the message "signoff SERVLET-INTEREST".
>
> Archives: http://archives.java.sun.com/archives/servlet-interest.html
> Resources: http://java.sun.com/products/servlet/external-resources.html
> LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
>
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html