Oxygen XML Editor, Version 14.2

ro.sync.sample.plugin.customprotocol
Class CustomProtocolHandler

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

public class CustomProtocolHandler
extends java.net.URLStreamHandler

Handler for the file2 protocol


Constructor Summary
CustomProtocolHandler()
           
 
Method Summary
static java.io.File getCanonicalFileFromFileUrl(java.net.URL url)
          On Windows names of files from network neighborhood must be corrected before open.
protected  java.net.URLConnection openConnection(java.net.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

CustomProtocolHandler

public CustomProtocolHandler()
Method Detail

openConnection

protected java.net.URLConnection openConnection(java.net.URL u)
                                         throws java.io.IOException
Creates and opens the connection

Specified by:
openConnection in class java.net.URLStreamHandler
Parameters:
u - The URL
Returns:
The connection
Throws:
java.io.IOException

getCanonicalFileFromFileUrl

public static java.io.File getCanonicalFileFromFileUrl(java.net.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:
java.lang.IllegalArgumentException - if the URL is not file.

Oxygen XML Editor, Version 14.2

© Copyright Syncro Soft SRL 2002 - 2013. All rights reserved.