I have a J2me client which needs to request images from a servlet and display them. The code that I am using at the servlet is something like this :
File f = new File(AppConstants.LOCAL_CONTEXT_PATH+"/"+path);
BufferedImage img = ImageIO.read(f);
ostr = response.getOutputStream();
However, the client residing on the emulator gives me an out of memory exception while trying to read the image.
Is there a better way to achieve the same, except for direct url hits?
And the emulator is the standard WTK emulator.
Awaiting a reply.
Thanks in advance.