java - ImageIO.write freezes after a while -
i have following code generates image used src of image element in html document:
bufferedimage iimage = (bufferedimage) camera.getimage(); servletoutputstream out = response.getoutputstream(); response.setcontenttype("image/jpeg"); imageoutputstream ios = imageio.createimageoutputstream(out); imageio.write(iimage, "jpg", ios); ios.close(); out.close();
the application deployed on apache tomcat. problem image freezing after while, think because of imageio.write, have tried use
imageio.setusecache(false);
but no success.
my question is, there alternative?, why imageio freezing?, can prevent freezing?
Comments
Post a Comment