how to decompress http response?
<p>Can any one of you solve this problem !</p>

<p>Problem Description:</p>

<p>i have received content-encoding: gzip header from http web-server.
now i want to decode the content but when i use GZIP classes from jdk 1.6.12, it gives null.</p>

<p>does it means that contents are not in gzip format ? or are there some another classes for decompress http response content?</p>

<h2>Sample Code:</h2>

<pre><code>System.out.println("Reading InputStream");
InputStream in = httpuc.getInputStream();// httpuc is an object of httpurlconnection&lt;br&gt;
System.out.println("Before reading GZIP inputstream");
System.out.println(in);
GZIPInputStream gin = new GZIPInputStream(in));
System.out.println("After reading GZIP inputstream");
</code></pre>

<h2>Output:<br></h2>

<pre><code>Reading InputStream
Before reading GZIP inputstream
sun.net.www.protocol.http.HttpURLConnection$HttpInputStream@8acf6e
null
</code></pre>

<p>I have found one error in code, but don't able to understand it properly. what does it indicates.</p>

<p>Error ! java.io.EOFException</p>

<p>Thanks</p>
