org.xwiki.classloader.internal.protocol.attachmentjar
Class AttachmentURLStreamHandler

java.lang.Object
  extended by java.net.URLStreamHandler
      extended by org.xwiki.classloader.internal.protocol.attachmentjar.AttachmentURLStreamHandler
All Implemented Interfaces:
ExtendedURLStreamHandler

@Component(value="attachmentjar")
public class AttachmentURLStreamHandler
extends java.net.URLStreamHandler
implements ExtendedURLStreamHandler

Special handler that allows building URLs that have their contents in a wiki document's attachment.

Since:
2.0.1
Version:
$Id$

Constructor Summary
AttachmentURLStreamHandler()
           
 
Method Summary
 java.lang.String getProtocol()
          
protected  java.net.URLConnection openConnection(java.net.URL url)
           Parse the attachment URL which is in the format attachmentjar://(wiki):(space).(page)@(filename).
 
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

AttachmentURLStreamHandler

public AttachmentURLStreamHandler()
Method Detail

getProtocol

public java.lang.String getProtocol()

Specified by:
getProtocol in interface ExtendedURLStreamHandler
See Also:
ExtendedURLStreamHandler.getProtocol()

openConnection

protected java.net.URLConnection openConnection(java.net.URL url)
                                         throws java.io.IOException
Parse the attachment URL which is in the format attachmentjar://(wiki):(space).(page)@(filename).

Specified by:
openConnection in class java.net.URLStreamHandler
Throws:
java.io.IOException
See Also:
URLStreamHandler.openConnection(URL)


Copyright © 2004-2011 XWiki. All Rights Reserved.