net.dpml.transit.artifact
Class Handler

java.lang.Object
  extended by java.net.URLStreamHandler
      extended by net.dpml.transit.artifact.Handler

public class Handler
extends URLStreamHandler

The artifact URL protocol handler.

Version:
1.0.3
Author:
Digital Product Meta Library

Constructor Summary
Handler()
          Creation of a new transit artifact protocol handler.
 
Method Summary
protected  URLConnection openConnection(URL url)
          Opens a connection to the specified URL.
protected  void parseURL(URL dest, String spec, int start, int limit)
          Parse the supplied specification.
protected  String toExternalForm(URL u)
          Return the external representation of the supplied url.
 
Methods inherited from class java.net.URLStreamHandler
equals, getDefaultPort, getHostAddress, hashCode, hostsEqual, openConnection, sameFile, setURL, setURL
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Handler

public Handler()
Creation of a new transit artifact protocol handler.

Method Detail

openConnection

protected URLConnection openConnection(URL url)
                                throws IOException
Opens a connection to the specified URL.

Specified by:
openConnection in class URLStreamHandler
Parameters:
url - A URL to open a connection to.
Returns:
The established connection.
Throws:
IOException - If a connection failure occurs.

toExternalForm

protected String toExternalForm(URL u)
Return the external representation of the supplied url.

Overrides:
toExternalForm in class URLStreamHandler
Parameters:
u - the url
Returns:
a string representing of the url as an artifact uri

parseURL

protected void parseURL(URL dest,
                        String spec,
                        int start,
                        int limit)
Parse the supplied specification.

Overrides:
parseURL in class URLStreamHandler
Parameters:
dest - the destination url to populate
spec - the supplied spec
start - the starting position
limit - the limit