Servlet che restituisce un'immagine
-5
Servlet returning an image.
// Suppose we have a byte array containing the image:
byte[] img;
// we should return it in the response:
response.setContentType("image/jpg");
OutputStream os = response.getOutputStream();
BufferedOutputStream bos = new BufferedOutputStream(os);
bos.write(img, 0, img.length);
bos.close();
Comments
Tue. Jul. 18th, 2006 4:03 AM
SurfMan
SurfMan





