OSGi gives back InputStream, Vaadin image needs a file/URI


I am reading some file from an OSGi bundle and want to pass it as a file or URI to image.
OSGi etther lets me have and inputstream like

final URL url = context.getBundle().getEntry("/img/module1.png");
final InputStream inputStream = url.openConnection().getInputStream();

or gives a URL like


The url is not valid for Vaadin since it expectes file:// and not bundle://. So, I am going more towards making my input stream somehow work with Image.

Any ideas ??, thanks