flesh out resource URL scheme implementation

This commit is contained in:
Joel Dice
2007-08-10 17:45:47 -06:00
parent 2e9b9fe8d4
commit d3931b4853
15 changed files with 267 additions and 90 deletions

View File

@ -1,9 +1,23 @@
package java.lang;
import java.net.URL;
import java.net.MalformedURLException;
public class SystemClassLoader extends ClassLoader {
private Object map;
protected native Class findClass(String name) throws ClassNotFoundException;
protected native Class findLoadedClass(String name);
private native boolean resourceExists(String name);
protected URL findResource(String name) {
if (resourceExists(name)) {
try {
return new URL("resource://" + name);
} catch (MalformedURLException ignored) { }
}
return null;
}
}