atti
asked on
URL-problems!
Hi,
I'm trying to write a snippet of code, to determine if a URL-documnet
exists, before I use it with the AppletContext.showDocument -method, and
it looks like this:
private boolean fileExist(URL url)
{
try {
InputStream testStream = url.openStream();
} catch (IOException ioe) {
return false;
}
return true;
}
, but it doesn't seem to work!
NetScape's implementation of Java doesn't seems to catch the IOException
at all!
Is there a better way?
I'm trying to write a snippet of code, to determine if a URL-documnet
exists, before I use it with the AppletContext.showDocument
it looks like this:
private boolean fileExist(URL url)
{
try {
InputStream testStream = url.openStream();
} catch (IOException ioe) {
return false;
}
return true;
}
, but it doesn't seem to work!
NetScape's implementation of Java doesn't seems to catch the IOException
at all!
Is there a better way?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Yes, I'm running Netscape 4 and it doesn't work.... :-(