code: public static Bundle installBundle(BundleContext context, Resource bundle, boolean checkExistence) throws IOException, BundleException {
  	if (checkExistence) {
  	    BundleFile bf = new BundleFile(bundle);
  	    if (!bf.isBundle()) throw new BundleException(bundle + " is not a valid bundle!");
  
  	    Bundle existing = loadBundleFromLocal(context, bf.getSymbolicName(), bf.getVersion(), false, null);
  	    if (existing != null) return existing;
  	}
  
  	return _loadBundle(context, bundle.getAbsolutePath(), bundle.getInputStream(), true);
      }
docs: only installs a bundle, if the bundle does not already exist, if the bundle exists the existing
  bundle is unloaded first.
  
  @param factory
  @param context
  @param bundle
  @return
  @throws IOException
  @throws BundleException