re PR libgcj/4728 (java.util.zip.GZIPOutputStream.write(int) doesn't update CRC)
authorTom Tromey <tromey@redhat.com>
Mon, 29 Oct 2001 21:50:07 +0000 (21:50 +0000)
committerTom Tromey <tromey@gcc.gnu.org>
Mon, 29 Oct 2001 21:50:07 +0000 (21:50 +0000)
* java/util/zip/GZIPOutputStream.java (write(int)): New method.
Fixes PR libgcj/4728.

From-SVN: r46618

libjava/ChangeLog
libjava/java/util/zip/GZIPOutputStream.java

index 303b11a21e77d7d9d06311c0c39276a2a88c66d8..f271a8ffd17f6fb7a061995cc2f2e2772a3f81d0 100644 (file)
@@ -1,3 +1,8 @@
+2001-10-29  Tom Tromey  <tromey@redhat.com>
+
+       * java/util/zip/GZIPOutputStream.java (write(int)): New method.
+       Fixes PR libgcj/4728.
+
 2001-10-27  Tom Tromey  <tromey@redhat.com>
 
        * include/jni.h (struct JNINativeInterface) [GetStringLength]:
index cf62fb7c6bf4135e51b2e36dcc1684129e8e59a8..1fb081b10ab9b2840ac25eb73dc9524dc5738faf 100644 (file)
@@ -1,5 +1,5 @@
 /* GZIPOutputStream.java - Create a file in gzip format
-   Copyright (C) 1999, 2000 Free Software Foundation, Inc.
+   Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc.
 
 This file is part of GNU Classpath.
 
@@ -78,6 +78,12 @@ public class GZIPOutputStream extends DeflaterOutputStream
     crc = new CRC32 ();
   }
 
+  public synchronized void write (int bval) throws IOException
+  {
+    super.write (bval);
+    crc.update (bval);
+  }
+
   public synchronized void write (byte[] buf) throws IOException
   {
     write (buf, 0, buf.length);