ro.sync.sample.plugin.customprotocol
Class Handler
java.lang.Object
java.net.URLStreamHandler
ro.sync.sample.plugin.customprotocol.Handler
public class Handler
- extends URLStreamHandler
Handler for the file2 protocol
Methods inherited from class java.net.URLStreamHandler |
equals, getDefaultPort, getHostAddress, hashCode, hostsEqual, openConnection, parseURL, sameFile, setURL, setURL, toExternalForm |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Handler
public Handler()
openConnection
protected URLConnection openConnection(URL u)
throws IOException
- Creates and opens the connection
- Specified by:
openConnection
in class URLStreamHandler
- Parameters:
u
- The URL
- Returns:
- The connection
- Throws:
IOException
getCanonicalFileFromFileUrl
public static File getCanonicalFileFromFileUrl(URL url)
- On Windows names of files from network neighborhood must be corrected before open.
- Parameters:
url
- The file URL.
- Returns:
- The cannonical or absolute file.
- Throws:
IllegalArgumentException
- if the URL is not file.
© Copyright Syncro Soft SRL 2002 - 2010.