Refactor adding stream to JAR into helper class