1 26 27 package org.objectweb.jonas_lib.loader.factory; 28 29 import java.net.URL ; 30 import java.io.IOException ; 31 32 42 public class JarURLFactory extends URLFactory { 43 44 45 private URL base; 46 47 48 private static final String JAR = "jar:"; 49 50 53 private static final String SEP = "!/"; 54 55 60 public JarURLFactory(URL url) { 61 base = url; 62 } 63 64 74 public URL getURL(String path) throws IOException { 75 if (path.equals("")) { 76 return base; 77 } else { 78 return new URL (JAR + base + SEP + path); 79 } 80 } 81 82 } 83 | Popular Tags |