/[classpath]/classpath/java/net/JarURLConnection.java
ViewVC logotype

Diff of /classpath/java/net/JarURLConnection.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.14 by mkoch, Sun Sep 21 18:49:18 2003 UTC revision 1.15 by mkoch, Sun Sep 21 18:58:54 2003 UTC
# Line 101  public abstract class JarURLConnection e Line 101  public abstract class JarURLConnection e
101      if (!url.getProtocol().equals ("jar"))      if (!url.getProtocol().equals ("jar"))
102        throw new MalformedURLException (url + ": Not jar protocol.");        throw new MalformedURLException (url + ": Not jar protocol.");
103    
104      String str = url.getFile();      String spec = url.getFile();
105    
106      int bang = str.indexOf ("!/");      int bang = spec.indexOf ("!/");
107      if (bang == -1)      if (bang == -1)
108        throw new MalformedURLException (url + ": No `!/' in spec.");        throw new MalformedURLException (url + ": No `!/' in spec.");
109    
110      // Extract the url for the jar itself.      // Extract the url for the jar itself.
111      jarFileURL = new URL (str.substring (0, bang));      jarFileURL = new URL (spec.substring (0, bang));
112    
113      // Get the name of the element, if any.      // Get the name of the element, if any.
114      entry_name = str.length() == (bang + 1) ? "" : str.substring (bang + 2);      entry_name = spec.length() == (bang + 1) ? "" : spec.substring (bang + 2);
115    }    }
116    
117    /**    /**

Legend:
Removed from v.1.14  
changed lines
  Added in v.1.15

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26