The input stream must be opened.
This commit is contained in:
parent
88156dc0c4
commit
19f38125e4
@ -72,10 +72,12 @@ public class WebUtil
|
||||
protected static void touch(final URL url)
|
||||
{
|
||||
HttpURLConnection uc = null;
|
||||
InputStream is = null;
|
||||
try
|
||||
{
|
||||
uc = openHttpUrlConnection(url);
|
||||
uc.connect();
|
||||
is = uc.getInputStream();
|
||||
}
|
||||
catch (IOException e)
|
||||
{
|
||||
@ -83,6 +85,7 @@ public class WebUtil
|
||||
}
|
||||
finally
|
||||
{
|
||||
try { is.close(); } catch (Exception ignored) {}
|
||||
try { uc.disconnect(); } catch (Exception ignored) {}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user