org.apache.wicket.util.io
Class Connections

java.lang.Object
  extended by org.apache.wicket.util.io.Connections

public class Connections
extends java.lang.Object

URLConnection related utilities

Author:
igor.vaynberg

Method Summary
static void close(java.net.URLConnection connection)
          Closes a connection
static void closeQuietly(java.net.URLConnection connection)
          Closes a connection, ignoring any exceptions if they occur
static java.io.File findFile(java.net.URL url)
          Tries to find a file on the harddisk that the url points to
static long getLastModified(java.net.URL url)
          Gets last modified date of the given URL
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getLastModified

public static long getLastModified(java.net.URL url)
                            throws java.io.IOException
Gets last modified date of the given URL

Parameters:
url -
Returns:
last modified timestamp
Throws:
java.io.IOException

findFile

public static java.io.File findFile(java.net.URL url)
                             throws java.lang.Exception
Tries to find a file on the harddisk that the url points to

Parameters:
url -
Returns:
file file pointing to the connection
Throws:
java.lang.Exception - if file could not be located

closeQuietly

public static void closeQuietly(java.net.URLConnection connection)
Closes a connection, ignoring any exceptions if they occur

Parameters:
connection -

close

public static void close(java.net.URLConnection connection)
                  throws java.io.IOException
Closes a connection

Parameters:
connection -
Throws:
java.io.IOException


Copyright © 2004-2009 Apache Software Foundation. All Rights Reserved.