aboutsummaryrefslogtreecommitdiff
path: root/libjava/classpath
diff options
context:
space:
mode:
authortromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4>2006-03-10 23:09:23 +0000
committertromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4>2006-03-10 23:09:23 +0000
commitb3c9e878a88866f035822406f53ae9f5b165ce96 (patch)
tree61a09663191772cb2d0e99154b48b8c6269350fa /libjava/classpath
parentd217355ec70102e776f09159d3831277b729affd (diff)
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@111949 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libjava/classpath')
-rw-r--r--libjava/classpath/ChangeLog.gcj6
-rw-r--r--libjava/classpath/java/util/zip/InflaterInputStream.java30
2 files changed, 23 insertions, 13 deletions
diff --git a/libjava/classpath/ChangeLog.gcj b/libjava/classpath/ChangeLog.gcj
index da0de501891..f1901eb17cf 100644
--- a/libjava/classpath/ChangeLog.gcj
+++ b/libjava/classpath/ChangeLog.gcj
@@ -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:
diff --git a/libjava/classpath/java/util/zip/InflaterInputStream.java b/libjava/classpath/java/util/zip/InflaterInputStream.java
index 3c374570602..08c1fd75a0b 100644
--- a/libjava/classpath/java/util/zip/InflaterInputStream.java
+++ b/libjava/classpath/java/util/zip/InflaterInputStream.java
@@ -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;
}
/**