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)
|
protected static void touch(final URL url)
|
||||||
{
|
{
|
||||||
HttpURLConnection uc = null;
|
HttpURLConnection uc = null;
|
||||||
|
InputStream is = null;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
uc = openHttpUrlConnection(url);
|
uc = openHttpUrlConnection(url);
|
||||||
uc.connect();
|
uc.connect();
|
||||||
|
is = uc.getInputStream();
|
||||||
}
|
}
|
||||||
catch (IOException e)
|
catch (IOException e)
|
||||||
{
|
{
|
||||||
@ -83,6 +85,7 @@ public class WebUtil
|
|||||||
}
|
}
|
||||||
finally
|
finally
|
||||||
{
|
{
|
||||||
|
try { is.close(); } catch (Exception ignored) {}
|
||||||
try { uc.disconnect(); } catch (Exception ignored) {}
|
try { uc.disconnect(); } catch (Exception ignored) {}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user