diff options
| author | Joshua Rahm <joshua.rahm@colorado.edu> | 2015-01-30 17:11:48 -0700 |
|---|---|---|
| committer | Joshua Rahm <joshua.rahm@colorado.edu> | 2015-01-30 17:11:48 -0700 |
| commit | 1c5e38fe69ac8a6decbdd8abe93112f4e3369315 (patch) | |
| tree | 926cef8cb76d46862ed2c4ec7028720611e47476 /src/org/eclipse/jdt/internal/jarinjarloader/RsrcURLStreamHandler.java | |
| download | Modulus3D-1c5e38fe69ac8a6decbdd8abe93112f4e3369315.tar.gz Modulus3D-1c5e38fe69ac8a6decbdd8abe93112f4e3369315.tar.bz2 Modulus3D-1c5e38fe69ac8a6decbdd8abe93112f4e3369315.zip | |
added source
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 |