Class Handler
- java.lang.Object
-
- java.net.URLStreamHandler
-
- ca.cgjennings.io.protocols.MappedURLHandler
-
- ca.cgjennings.io.protocols.project.Handler
-
public class Handler extends MappedURLHandler
A URL protocol handler for theproject:protocol, which accesses the contents of the open project.Note: the unusual class name is required for this class to be used by the default protocol handler factory.
- Since:
- 3.0
- Author:
- Chris Jennings
-
-
Constructor Summary
Constructors Constructor Description Handler()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.net.URLConnectionmapConnection(java.net.URL sourceURL, java.net.URL mappedURL)Returns aURLConnectionfor the mapped URL.protected voidparseURL(java.net.URL u, java.lang.String spec, int start, int limit)-
Methods inherited from class ca.cgjennings.io.protocols.MappedURLHandler
getComposedPath, install, mapURL, openConnection, removeRelativePathComponents
-
-
-
-
Method Detail
-
parseURL
protected void parseURL(java.net.URL u, java.lang.String spec, int start, int limit)- Overrides:
parseURLin classjava.net.URLStreamHandler
-
mapConnection
protected java.net.URLConnection mapConnection(java.net.URL sourceURL, java.net.URL mappedURL) throws java.io.IOExceptionDescription copied from class:MappedURLHandlerReturns aURLConnectionfor the mapped URL. The base class returnsmappedURL.openConnection().- Overrides:
mapConnectionin classMappedURLHandler- Parameters:
sourceURL- the original URLmappedURL- the mapped URL returned fromMappedURLHandler.mapURL(java.net.URL)- Returns:
- a connection for the URL
- Throws:
java.io.IOException- if an I/O error occurs or the mapped URL isnull
-
-