1 18 19 package org.osgi.service.url; 20 21 import java.net.*; 22 23 34 public abstract class AbstractURLStreamHandlerService extends URLStreamHandler 35 implements URLStreamHandlerService { 36 39 public abstract URLConnection openConnection(URL u) 40 throws java.io.IOException ; 41 42 46 protected URLStreamHandlerSetter realHandler; 47 48 58 public void parseURL(URLStreamHandlerSetter realHandler, URL u, 59 String spec, int start, int limit) { 60 this.realHandler = realHandler; 61 parseURL(u, spec, start, limit); 62 } 63 64 69 public String toExternalForm(URL u) { 70 return super.toExternalForm(u); 71 } 72 73 78 public boolean equals(URL u1, URL u2) { 79 return super.equals(u1, u2); 80 } 81 82 87 public int getDefaultPort() { 88 return super.getDefaultPort(); 89 } 90 91 96 public InetAddress getHostAddress(URL u) { 97 return super.getHostAddress(u); 98 } 99 100 105 public int hashCode(URL u) { 106 return super.hashCode(u); 107 } 108 109 114 public boolean hostsEqual(URL u1, URL u2) { 115 return super.hostsEqual(u1, u2); 116 } 117 118 123 public boolean sameFile(URL u1, URL u2) { 124 return super.sameFile(u1, u2); 125 } 126 127 135 protected void setURL(URL u, String proto, String host, int port, 136 String file, String ref) { 137 realHandler.setURL(u, proto, host, port, file, ref); 138 } 139 140 146 protected void setURL(URL u, String proto, String host, int port, 147 String auth, String user, String path, String query, String ref) { 148 realHandler.setURL(u, proto, host, port, auth, user, path, query, ref); 149 } 150 } 151 | Popular Tags |