| 79 | } |
| 80 | |
| 81 | private static URLStreamHandler findHandler(String protocol) |
| 82 | throws MalformedURLException |
| 83 | { |
| 84 | if ("http".equals(protocol) || "https".equals(protocol)) { |
| 85 | return new avian.http.Handler(); |
| 86 | } else if ("avianvmresource".equals(protocol)) { |
| 87 | return new avian.avianvmresource.Handler(); |
| 88 | } else if ("file".equals(protocol)) { |
| 89 | return new avian.file.Handler(); |
| 90 | } else if ("jar".equals(protocol)) { |
| 91 | return new avian.jar.Handler(); |
| 92 | } else { |
| 93 | throw new MalformedURLException("unknown protocol: " + protocol); |
| 94 | } |
| 95 | } |
| 96 | |
| 97 | public void set(String protocol, String host, int port, String file, |
| 98 | String ref) |