re PR libgcj/25713 (GZIPOutputStream bad checksum)

libjava
	PR libgcj/25713:
	* java/util/zip/Deflater.java (flush): New method.
	* sources.am, Makefile.in: Rebuilt.
	* java/util/zip/DeflaterOutputStream.java: Removed.
	* java/util/zip/InflaterInputStream.java: Likewise.
	* java/util/zip/GZIPInputStream.java: Likewise.
	* java/util/zip/GZIPOutputStream.java: Likewise.
libjava/classpath
	For PR libgcj/25713:
	* java/util/zip/InflaterInputStream.java (read): Replaced with
	libgcj implementation.

From-SVN: r111949
This commit is contained in:
Tom Tromey 2006-03-10 23:09:23 +00:00 committed by Tom Tromey
parent 21f9ec0c6a
commit ea725d4524
10 changed files with 48 additions and 878 deletions

View file

@ -1,3 +1,9 @@
2006-03-10 Tom Tromey <tromey@redhat.com>
For PR libgcj/25713:
* java/util/zip/InflaterInputStream.java (read): Replaced with
libgcj implementation.
2006-03-08 Tom Tromey <tromey@redhat.com>
PR libgcj/24183:

View file

@ -1,5 +1,5 @@
/* InflaterInputStream.java - Input stream filter for decompressing
Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004
Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2006
Free Software Foundation, Inc.
This file is part of GNU Classpath.
@ -186,31 +186,35 @@ public class InflaterInputStream extends FilterInputStream
throw new IOException("stream closed");
if (len == 0)
return 0;
if (inf.finished())
return -1;
int count = 0;
for (;;)
while (count == 0)
{
if (inf.needsInput())
fill();
try
{
count = inf.inflate(b, off, len);
if (count == 0)
{
if (this.len == -1)
{
// Couldn't get any more data to feed to the Inflater
return -1;
}
if (inf.needsDictionary())
throw new ZipException("Inflater needs Dictionary");
}
}
catch (DataFormatException dfe)
{
throw new ZipException(dfe.getMessage());
}
if (count > 0)
return count;
if (inf.needsDictionary()
| inf.finished())
return -1;
else if (inf.needsInput())
fill();
else
throw new InternalError("Don't know what to do");
}
return count;
}
/**