From 1c5e38fe69ac8a6decbdd8abe93112f4e3369315 Mon Sep 17 00:00:00 2001 From: Joshua Rahm Date: Fri, 30 Jan 2015 17:11:48 -0700 Subject: added source --- .../jarinjarloader/RsrcURLStreamHandler.java | 50 ++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 src/org/eclipse/jdt/internal/jarinjarloader/RsrcURLStreamHandler.java (limited to 'src/org/eclipse/jdt/internal/jarinjarloader/RsrcURLStreamHandler.java') 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 -- cgit