Bonjour

J'ai besoin de decompresser une reponse HTTP zipé, et je me trouve tout le temps dans ce probléme
java.io.EOFException: Unexpected end of ZLIB input stream
at java.util.zip.InflaterInputStream.fill(InflaterInputStream.java:216)
at java.util.zip.InflaterInputStream.read(InflaterInputStream.java:134)
at java.util.zip.GZIPInputStream.read(GZIPInputStream.java:87)
at com.adhoc.plugins.proxyadhoc.protocole.MethodGet.GzipDecoding(MethodGet.java:271)
at com.adhoc.plugins.proxyadhoc.protocole.MethodGet.run(MethodGet.java:185)
at com.adhoc.plugins.proxyadhoc.threads.ProxyServerClientThread.run(ProxyServerClientThread.java:288)



Je pense que cette erreur est du à cause du boucle suivante


try {
in = new GZIPInputStream(new BufferedInputStream(rawin));
} catch (IOException e) {
in1 = new ZipInputStream(new BufferedInputStream(rawin));
}
byte[] buf = new byte[8192];
int len = 0;
if (in != null) {
int compteur = 0;
while (((len = in.read(buf, 0, 8192)) != -1)) {
clientOut.write(buf, 0, len);
System.out.println("Iteration :" + compteur + "=>" +clientOut.size()+"||"+ clientOut.toString());
System.out.println("--------->"+ contentLengthToString);
clientOut.flush();
try {
if (charset != "") //$NON-NLS-1$
out += new String(buf, 0, len, charset);
} catch (IOException e) {
out += new String(buf, 0, len, "8859_1"); //$NON-NLS-1$
}


Merci pour votre aide
compteur++;
}
in.close();