package com.jxml.protocol.classpath;
import java.net.*;
import java.io.*;

/**
 * Protocol hook class for the jxml classpath protocol.
 */
public class Handler extends URLStreamHandler
{
	/**
	 * Called by the Java runtime to open a classpath url.
	 */
		public URLConnection
	openConnection(URL url)
		throws IOException
	{
		String file=url.getFile();
		if (!file.startsWith("/"))
			throw new IOException("classpath url requires an absolute path");
		return new ClassPathURLConnection(url);
	}
}
