code: public MetadataBuilder addDataSource(@NotNull InputStream dataSource, String path, boolean closeAfterBuild) {
      checkHashingResultIsNotSet();
      filesPaths.add(path);
      dataSources.add(new StreamBasedHolderImpl(dataSource, closeAfterBuild));
      return this;
    }
docs: add custom source in torrent with custom path. Path can be separated with any slash.
  
  @param closeAfterBuild if true then source stream will be closed after {@link #build()} invocation