Beispiel #1
0
 public URL getResource(String path) {
   try {
     File f = getFile(path);
     if (!f.exists()) return null;
     return f.toURL();
   } catch (FileNotFoundException fnf) {
     // the spec says to return null if we can't find it
     // even though this is weird...
     return null;
   } catch (IOException ioe) {
     throw new RuntimeException("error opening [" + path + "]", ioe);
   }
 }