How to show image saved into db in a field Blob

anyone know how to show in my vaadin application an image saved into my db in a field Blob?

Here is how to create a StreamResource out of your blob field[code]
StreamSource streamSource = new StreamSource()
public InputStream getStream()
Blob blob =(Blob) item.getItemProperty(“DocumentBlobField”).getValue();
byte bas = null;
try {
if(blob!=null && blob.length()>1){
bas = (byte) blob.getBytes(1,(int) blob.length());
} catch (SQLException e) {
return (bas == null) ? null : new ByteArrayInputStream(bas);
return null;

  StreamResource resource = new StreamResource(streamSource, str_Dokname);


Thanks Marius. All works fine!!!
Here the code that I used in my vaadin application:

CssLayout frame = new CssLayout();
final JPAContainerItem<MyEntity> img = (JPAContainerItem<MyEntity>) images.getItem(iid);
                StreamSource streamSource = new StreamSource(){
                       public InputStream getStream(){
                    	  byte[] bas =(byte[]
) img.getEntity().getImg();
                         return new ByteArrayInputStream(bas);
StreamResource resource = new StreamResource(streamSource, img.getEntity().getId().toString());
frame.addComponent(new Image(img.getEntity().getCaption(), resource));