Hello everybody,
I am facing a very strange problem But first a background to the problem
:
I have a Image which I am converting to an array of int's using
PixelGrabber.
Then I convert this array to a byte array and pass this to the servlet
using BufferedOutputstream(urlconnecton.getOutputStream()).
In the servlet, I read the stream using BufferedInputstream and create a
FileOutputStream - mypicture.jpeg. I pass this file to the encoder which
writes to mypicture.jpeg.
The problem is that the jpeg file is not being created properly. To
verify that the array of bytes which I sent to the servlet was proper, I
sent it back to the applet via
BufferedOutputstream(response.getOutputStream) and recreated the image in
the applet. The image was exactly as I had passed to the servlet.
What is the problem here? Another thing that i noticed was the file size is
always 1Kb or 2 Kb when written by the servlet and the same file wnen
recreated in the applet was anything beyong 20Kb(depending upon the image)
What am I missing here? Please help.
thanks.
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html