1 package org.columba.mail.url.cid; 17 18 import java.io.IOException ; 19 import java.net.URL ; 20 import java.net.URLConnection ; 21 import java.net.URLStreamHandler ; 22 23 24 public class Handler extends URLStreamHandler { 25 protected void parseURL(URL u, String spec, int start, int limit) { 26 setURL(u, u.getProtocol(), null, -1, null, null, null, null, 27 spec.substring(start)); 28 } 29 30 protected URLConnection openConnection(URL u) throws IOException { 31 return new CidURLConnection(u); 32 } 33 34 protected String toExternalForm(URL u) { 35 return u.getProtocol() + ':' + u.getRef(); 36 } 37 } 38 | Popular Tags |