Methods Summary |
---|
public java.util.Iterator | getEntries()
return entries.iterator();
|
public java.io.InputStream | getEntry(java.lang.String entryPath)
if (!entries.contains(entryPath)) {
return null;
}
JarInputStream jis = new JarInputStream(
new BufferedInputStream(url.openStream()));
do {
ZipEntry ze = jis.getNextEntry();
if (ze == null) {
break;
}
if (ze.getName().equals(entryPath)) {
return jis;
}
} while (true);
// don't close the stream, as the caller has to read from it.
assert(false); // should not reach here
return null;
|
public java.net.URL | getEntryAsURL(java.lang.String entryPath)
URL result = entries.contains(entryPath) ?
result = new URL("jar:"+url+"!/"+entryPath) : null; // NOI18N
return result;
|
public java.net.URL | getRootURL()
return url;
|
private void | init()
JarInputStream jis = new JarInputStream(
new BufferedInputStream(url.openStream()));
try {
do {
ZipEntry ze = jis.getNextEntry();
if (ze == null) {
break;
}
if (!ze.isDirectory()) {
entries.add(ze.getName());
}
} while (true);
} finally {
jis.close();
}
|