home *** CD-ROM | disk | FTP | other *** search
- package sun.misc;
-
- import java.io.File;
- import java.io.IOException;
- import java.net.URL;
-
- class URLClassPath$FileLoader extends URLClassPath.Loader {
- private File dir;
-
- URLClassPath$FileLoader(URL var1) throws IOException {
- super(var1);
- if (!"file".equals(var1.getProtocol())) {
- throw new IllegalArgumentException("url");
- } else {
- this.dir = new File(var1.getFile().replace('/', File.separatorChar));
- }
- }
-
- Resource getResource(String var1, boolean var2) {
- try {
- URL var3 = new URL(((URLClassPath.Loader)this).getBaseURL(), var1);
- if (!var3.getFile().startsWith(((URLClassPath.Loader)this).getBaseURL().getFile())) {
- return null;
- } else {
- if (var2) {
- URLClassPath.check(var3);
- }
-
- File var4 = new File(this.dir, var1.replace('/', File.separatorChar));
- return var4.exists() ? new URLClassPath.6(this, var1, var3, var4) : null;
- }
- } catch (Exception var5) {
- return null;
- }
- }
- }
-