diff options
Diffstat (limited to 'src/org/eclipse/jdt/internal/jarinjarloader/RsrcURLStreamHandler.java')
| -rw-r--r-- | src/org/eclipse/jdt/internal/jarinjarloader/RsrcURLStreamHandler.java | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/src/org/eclipse/jdt/internal/jarinjarloader/RsrcURLStreamHandler.java b/src/org/eclipse/jdt/internal/jarinjarloader/RsrcURLStreamHandler.java new file mode 100644 index 0000000..0744c28 --- /dev/null +++ b/src/org/eclipse/jdt/internal/jarinjarloader/RsrcURLStreamHandler.java @@ -0,0 +1,50 @@ +/* */ package org.eclipse.jdt.internal.jarinjarloader; +/* */ +/* */ import java.io.IOException; +/* */ import java.net.URL; +/* */ import java.net.URLConnection; +/* */ import java.net.URLStreamHandler; +/* */ +/* */ public class RsrcURLStreamHandler extends URLStreamHandler +/* */ { +/* */ private ClassLoader classLoader; +/* */ +/* */ public RsrcURLStreamHandler(ClassLoader classLoader) +/* */ { +/* 33 */ this.classLoader = classLoader; +/* */ } +/* */ +/* */ protected URLConnection openConnection(URL u) throws IOException { +/* 37 */ return new RsrcURLConnection(u, this.classLoader); +/* */ } +/* */ +/* */ protected void parseURL(URL url, String spec, int start, int limit) +/* */ { +/* */ String file; +/* */ String file; +/* 42 */ if (spec.startsWith("rsrc:")) { +/* 43 */ file = spec.substring(5); +/* */ } +/* */ else +/* */ { +/* */ String file; +/* 44 */ if (url.getFile().equals("./")) { +/* 45 */ file = spec; +/* */ } +/* */ else +/* */ { +/* */ String file; +/* 46 */ if (url.getFile().endsWith("/")) +/* 47 */ file = url.getFile() + spec; +/* */ else +/* 49 */ file = spec; +/* */ } +/* */ } +/* 50 */ setURL(url, "rsrc", "", -1, null, null, file, null, null); +/* */ } +/* */ } + +/* Location: Modulus.jar + * Qualified Name: org.eclipse.jdt.internal.jarinjarloader.RsrcURLStreamHandler + * JD-Core Version: 0.6.2 + */
\ No newline at end of file |