I want to send multiple .png images as an single image through servlet response.getOutputStream().write(encoder.pngEncode());
But i can send only one image at a time,but i need to send multiple images through response object using java. If anyone knows please give me your inputs.
// Create a set of charts
JFreeChart chart1=null;
BufferedImage buf[] = new BufferedImage[5];
PngEncoder encoder[] = new PngEncoder[5];
for (int i=0; i<5; i++ )
{
buf[i] = chart[i].createBufferedImage(400, 350, null);
encoder[i] = new PngEncoder( buf[i], false, 0, 9 );
System.out.println("i= "+i);
resp.getOutputStream().write( encoder[i].pngEncode() );
}