protected BundleEntry findBundleEntry(URL url, AbstractBundle bundle) throws IOException {
BaseClassLoader classloader = getBundleClassLoader(bundle);
if (classloader == null)
throw new FileNotFoundException(url.getPath());
ClasspathManager cpManager = classloader.getClasspathManager();
int index = url.getPort();
BundleEntry entry = null;
if (index == 0) {
entry = cpManager.findLocalEntry(url.getPath());
} else {
Enumeration entries = cpManager.findLocalEntries(url.getPath());
if (entries != null)
for (int i = 0; entries.hasMoreElements() && i <= index; i++)
entry = (BundleEntry) entries.nextElement();
}
if (entry == null)