Class Connections


  • public class Connections
    extends Object
    URLConnection related utilities
    Author:
    igor.vaynberg
    • Method Detail

      • getLastModified

        public static Instant getLastModified​(URL url)
                                       throws IOException
        Gets last modified date of the given URL
        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 -