Images are not displaying using stream resource and Embedded

Hi,

Images are not displaying from database using Embedded component in Vaadin 6.7.8

source code :-

if (obj.getType() == Type.picture)
{
final StreamSource streamSource = new StreamSource()
{
private static final long serialVersionUID = 6713415157957928459L;

@Override
public InputStream getStream()
{
 return new ByteArrayInputStream(obj.getImage());
}

};

final SimpleDateFormat df = new SimpleDateFormat(“yyyyMMddHHmmssSSS”);
final String filename = “myfilename-” + df.format(new Date()) + “.jpg”;

StreamResource resource = new StreamResource(streamSource, filename, getApplication());
resource.setMIMEType(“image/jpeg”);
resource.setCacheTime(1000);

Embedded embedded = new Embedded();
embedded.setSource(resource);
embedded.requestRepaint();

body.addComponent(embedded);
}

I can see img tag using firebug but it showing “failed to load given URL for image”

html code (using firebug) :-

Please suggest