ZipExporter exporter = archive.as(ZipExporter.class);
return AbstractVFS.toVirtualFile(archive.getName(), exporter.exportAsInputStream());
}
private BundleHandle installBundle(VirtualFile virtualFile) throws BundleException, IOException {
BundleInfo info = BundleInfo.createBundleInfo(virtualFile);
String streamURL = info.getRoot().getStreamURL().toExternalForm();
FrameworkMBean frameworkMBean = jmxSupport.getFrameworkMBean();
long bundleId = frameworkMBean.installBundleFromURL(info.getLocation(), streamURL);
return new BundleHandle(bundleId, info.getSymbolicName());
}