import java.net.*;
import java.io.*;

public class URLStringTest {
    public static void main(String[] args) throws Exception {
// Custom Stream Handler Factory
	URL.setURLStreamHandlerFactory(new StringSHFactory());
	// Add our custom handler
	String path=System.getProperty("java.content.handler.pkgs","");
	if (!path.equals("")) path+="|";
	path+="com.al_williams.contenthandlers";
	System.setProperty("java.content.handler.pkgs",path);

	URL url=new URL("string://www.coriolis.com");
	Class [] clist = new Class[1];
	clist[0]=String.class;
	String s=(String)url.getContent(clist);
	System.out.println(s);
    }
}


