3 import java.io.IOException;
4 import java.io.InputStream;
11 * Returns true if it is possible to open an input stream at the given URL,
12 * else false. The input stream is closed.
17 public static boolean isValidUrl(String url)
19 InputStream is = null;
22 is = new URL(url).openStream();
27 } catch (IOException x)
29 // MalformedURLException, FileNotFoundException
38 } catch (IOException e)