re PR libgcj/4728 (java.util.zip.GZIPOutputStream.write(int) doesn't update CRC)
* java/util/zip/GZIPOutputStream.java (write(int)): New method. Fixes PR libgcj/4728. From-SVN: r46618
This commit is contained in:
parent
54ee97997a
commit
0db58ea45f
2 changed files with 12 additions and 1 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue