I've a requirement to add multiple images to a output stream and display those images in JSF.
Ex code:
List<inputStream> images = list of inputstream - each image is one input stream
ByteArrayOutputStream stream = new ByteArrayOutputStream()
for(inputStream iStream: images){
stream.write(IOUtils.toByteArray(iStream);
}
return stream.toByteArray();
Now it is displaying only first Image but not displaying remaining images.
Please help me here to get pass multiple images and display in jsp.