code: public static void storeToFolder(File folder, Collection<? extends EclipseBundle> bundles,
          Collection<? extends EclipseFeature> features) throws IOException {
          File pluginsFolder = new File(folder, PLUGINS_FOLDER);
          File featuresFolder = new File(folder, FEATURES_FOLDER);
          FileUtils.forceMkdir(pluginsFolder);
          FileUtils.forceMkdir(featuresFolder);
          for (EclipseFeature feature : features) {
              if (feature instanceof StreamReference) {
                  try (InputStream stream = ((StreamReference) feature).createStream()) {
                      FileUtils.copyInputStreamToFile(stream,
                          new File(featuresFolder, getFileName(feature)));
                  }
              }
              else {
                  throw new IllegalArgumentException("feature " + createWrongTypeMsg(feature));
              }
          }
  
          for (EclipseBundle bundle : bundles) {
              if (bundle instanceof StreamReference) {
                  try (InputStream stream = ((StreamReference) bundle).createStream()) {
                      FileUtils.copyInputStreamToFile(stream,
                          new File(pluginsFolder, getFileName(bundle)));
                  }
              }
              else {
                  throw new IllegalArgumentException("bundle " + createWrongTypeMsg(bundle));
              }
          }
      }
docs: Stores the given collection of bundles and features to the given folder in a way so it can be
  read back by the directory resolver. All bundles and features must be able to be transformed
  to an input stream via the {@link StreamReference} interface or an exception is raised!
  
  @param folder
  the folder to store the artifacts to
  @param bundles
  the bundles to store
  @param features
  the features to store
  @throws IOException
  if an I/O error occurs