Package org.apache.wicket.util.io
Class Connections
- java.lang.Object
-
- org.apache.wicket.util.io.Connections
-
public class Connections extends Object
URLConnectionrelated utilities- Author:
- igor.vaynberg
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidclose(URLConnection connection)Closes a connectionstatic voidcloseQuietly(URLConnection connection)Closes a connection, ignoring any exceptions if they occurstatic InstantgetLastModified(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
nullif 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
-
-