Hi All,

 

            I am sending a gzip file to a servlet in the following way.

            

            public class GZIPInputStreamRequestEntity extends
InputStreamRequestEntity {

            private byte[] data;

            private long length;

            

            

            public GZIPInputStreamRequestEntity(InputStream in,byte[] data){

                        super(in);

                        this.data = data;

            }

            public GZIPInputStreamRequestEntity(InputStream content, long
contentLength, String contentType,byte[] data) {

                        super(content,contentLength,contentType);

                        this.length = contentLength;

                        this.data = data;

            }

            public void writeRequest(OutputStream out) throws IOException {

                        GZIPOutputStream gos = new GZIPOutputStream(new
BufferedOutputStream(out));

                        gos.write(data, 0, data.length);

                        

                        //gos.finish();

                        gos.flush();

                        //gos.close();

            }

            

}

 

            Since the gzip stream is not closed; while reading the stream at
the server end following error is

thrown:

 

                        Exception java.io.EOFException: Unexpected end of
ZLIB input stream

            

            I have tried to send using multi part but the same error.
Solution this problem seems to be closing

the output stream. If the output stream is closed, socket and connection
closed exceptions are thrown.

 

                        

            Appreciate any help in this regard.

 

 

Thanx & Regards

amar



This message is confidential and may also be legally privileged. If you are not 
the intended recipient, please notify [EMAIL PROTECTED] immediately. You should 
not copy it or use it for any purpose, nor disclose its contents to any other 
person. The views and opinions expressed in this e-mail message are the 
author's own and may not reflect the views and opinions of ADP.

Reply via email to