code: public static InputStream getInputStreamForLooseModule(String location) throws IOException {
          ByteArrayOutputStream baos = new ByteArrayOutputStream();
          JarOutputStream jos = new JarOutputStream(baos);
          ZipEntry looseBundlePropsEntry = new ZipEntry(BUNDLE_PROPERTY_ENTRY_NAME);
          jos.putNextEntry(looseBundlePropsEntry);
          Properties looseProps = new Properties();
          looseProps.setProperty(BUNDLE_LOCATION, location);
          looseProps.store(jos, "LooseBundle");
          jos.close();
          return new ByteArrayInputStream(baos.toByteArray());
      }
docs: Use this method to obtain an inputstream to use when installing a loose bundle.
  <br>
  The location passed, will be the location passed within the ModuleInfo
  when invoking the ModuleContainerFinder later.
  
  @param location
  @return InputStream for OSGi to use when installing the new loose bundle
  @throws IOException if an error occurs creating the inputstream..