JarURLFactory.java

00001 
00027 package org.objectweb.jonas_lib.loader.factory;
00028 
00029 import java.net.URL;
00030 import java.io.IOException;
00031 
00042 public class JarURLFactory extends URLFactory {
00043 
00045     private URL base;
00046 
00048     private static final String JAR = "jar:";
00049 
00053     private static final String SEP = "!/";
00054 
00060     public JarURLFactory(URL url) {
00061         base = url;
00062     }
00063 
00074     public URL getURL(String path) throws IOException {
00075         if (path.equals("")) {
00076             return base;
00077         } else {
00078             return new URL(JAR + base + SEP + path);
00079         }
00080     }
00081 
00082 }

Generated on Tue Feb 15 15:05:55 2005 for JOnAS by  doxygen 1.3.9.1