Package org.apache.wicket.util.io
Class Connections
- java.lang.Object
-
- org.apache.wicket.util.io.Connections
-
public class Connections extends Object
URLConnection
related utilities- Author:
- igor.vaynberg
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
close(URLConnection connection)
Closes a connectionstatic void
closeQuietly(URLConnection connection)
Closes a connection, ignoring any exceptions if they occurstatic Instant
getLastModified(URL url)
Gets last modified date of the givenURL
-
-
-
Method Detail
-
getLastModified
public static Instant getLastModified(URL url) throws IOException
Gets last modified date of the givenURL
- Parameters:
url
-- Returns:
- last modified timestamp or
null
if not available - Throws:
IOException
-
closeQuietly
public static void closeQuietly(URLConnection connection)
Closes a connection, ignoring any exceptions if they occur- Parameters:
connection
-
-
close
public static void close(URLConnection connection) throws IOException
Closes a connection- Parameters:
connection
-- Throws:
IOException
-
-