How to display buffered image in JSF without writing image on disk?
问题 I have a buffered image and I need to display it in a JSF page. Is there any UI component available which can display a buffered image directly? I am using JSF 2.2. 回答1: If you only have the buffered image, you could use the Omnifaces library to which allows you to render images by passing a byte[] to the component <o:graphicImage value="#{bean.image}" dataURI="true" /> If you have the buffered image you could convert to byte array like so: ByteArrayOutputStream baos = new