Dynamic Resource + Embedded: LoadedHandler?

Hi,
I have a question about Resource and Embedded in Vaadin 6.8

My problem is:
I load a profile picture of an user as bytes from the database and convert it to a Resource object:


public static Resource create(final Picture pic, final User user, Application app){

		if (pic == null || pic.getBytes().length==0)
			return new ThemeResource(NO_USER_IMAGE);
		
		
		String name = user.getId()+".png";
		 
		StreamResource res = new StreamResource(new ProfilePicSource(pic), name, app);
		res.setCacheTime(0);
		
		return res;
	}

If the user has not set a profile picture the Picture (a object conataining the bytes) is null and a ThemeResource (“anonymous picture”) is returned.
Then I show the users profile picture on screen by using the Resource with an Embedded.


Embedded e = new Embedded(null, create(pic, user, getApplication()));

So far so good, everything works like expected,
but sometimes (I guess) the Resource is not loaded in time for displaying with an Embedded. So the Embedded is not displayed on screen. If I reload the View, the profile picture is displayed correctly on screen.

Is there a listener that I can use to determine, when the Resource (StreamResource) has been loaded completely and is now ready to be displayed on screen?