MenuItem Icon from MySQL JDBC Blob

Hi,
i have a user image stored in database, i can get a photo with a ResultSet.getBlob(“Col_Name”) ;
and can convert it in InputStream.
Please can you help me on how to manipulate a InputStream to replace a Icon in menu Item.
code :
MenuItem settingsItem ;
settingsItem.addItem(“Account”,
FontAwesome.USER
, new Command() {
@Override
public void menuSelected(MenuItem selectedItem) {
getUI().getCurrent().getNavigator().navigateTo(“UserProfiler”);
}
});
Thank you in advance
@+

Use [code]
new StreamResource(new StreamResource.StreamSource() {

        @Override
        public InputStream getStream() {
            return new ByteArrayInputStream(ResultSet.getBlob("Col_Name"));
        }
    }, "userIcon.png")

[/code]instead of static icon.

Thank you Agata :slight_smile:
it work fine