I'm transferring a ObjectOutputStream which I wrap in GZIPOutputstream.
Correspondingly, I use GzipInputStream to recieve it; However I get the
above error ... if I just use Objectoutputstream without wrapping it
works fine. What could be the problem. So far I believed that if any
stream could be sent across; it could be zipped and sent across without
any problem. My problem occurs while trying to read from the stream:
java.io.EOFException: Unexpected end of ZLIB input stream
Please help.
TIA,
Carlos
pls cc to my mail as well.
--
"...the people who are crazy enough to think they
can change the world...are the ones who do."
- 'Think Different' - Apple Computer, 1997
> Hi,
>
> I'm transferring a ObjectOutputStream which I wrap in GZIPOutputstream.
> Correspondingly, I use GzipInputStream to recieve it; However I get the
> above error ... if I just use Objectoutputstream without wrapping it
> works fine. What could be the problem. So far I believed that if any
> stream could be sent across; it could be zipped and sent across without
> any problem. My problem occurs while trying to read from the stream:
>
> java.io.EOFException: Unexpected end of ZLIB input stream
I remember that if you're reading from ZipInputStream you cannot rely
on read() returning -1 on EOF. Instead first use available() to
determine the data size and read exactly up to that number of bytes
(Of course I'm not sure if it's your problem)
-trung
>
> Please help.
> TIA,
> Carlos
>
> pls cc to my mail as well.
>
> --
> "...the people who are crazy enough to think they
> can change the world...are the ones who do."
> - 'Think Different' - Apple Computer, 1997
--
To reply by e-mail, remove 'KILLSPAM' from my address in From: line
java.io.EOFException: Unexpected end of ZLIB input stream
When I just try to send an integer across (for testing) I get
Streamcorrupted exception and something being mentioned about he stream
header causing problems. Is it that the http headers which are sent along
are somehow interferring?
I have something like this ...
ObjectOutputStream oos =new ObjectOutputStream((new
GZIPOutputStream(servletoutputstreamobjectref)))
And i recieve it with the corresponding input streams ... is there anything
im doing wrong??!
TIA,
Carlos
Carlos Nicholas Fernandes wrote:
> Hi,
>
> I'm transferring a ObjectOutputStream which I wrap in GZIPOutputstream.
> Correspondingly, I use GzipInputStream to recieve it; However I get the
> above error ... if I just use Objectoutputstream without wrapping it
> works fine. What could be the problem. So far I believed that if any
> stream could be sent across; it could be zipped and sent across without
> any problem. My problem occurs while trying to read from the stream:
>
> java.io.EOFException: Unexpected end of ZLIB input stream
>