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 |
/** |
/** |