Oxygen XML Editor, Version ${standalone-version-number}

ro.sync.sample.plugin.customprotocol
Class Handler

java.lang.Object
  extended by java.net.URLStreamHandler
      extended by ro.sync.sample.plugin.customprotocol.Handler

public class Handler
extends URLStreamHandler

Handler for the file2 protocol


Constructor Summary
Handler()
           
 
Method Summary
static File getCanonicalFileFromFileUrl(URL url)
          On Windows names of files from network neighborhood must be corrected before open.
protected  URLConnection openConnection(URL u)
          Creates and opens the connection
 
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
 

Constructor Detail

Handler

public Handler()
Method Detail

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.

Oxygen XML Editor, Version ${standalone-version-number}

© Copyright Syncro Soft SRL 2002 - 2010.