aboutsummaryrefslogtreecommitdiff
path: root/libjava
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2005-01-05 20:41:27 +0000
committerTom Tromey <tromey@gcc.gnu.org>2005-01-05 20:41:27 +0000
commitea97f102ef78054ce0b11ee31fddc628b01b4d4a (patch)
treef0156a7f7b6f0fbee823897c780949905d3bd20a /libjava
parentd2ad2c8a9cea5cc01db606f39b73b1cbfd0622d6 (diff)
downloadgcc-ea97f102ef78054ce0b11ee31fddc628b01b4d4a.zip
gcc-ea97f102ef78054ce0b11ee31fddc628b01b4d4a.tar.gz
gcc-ea97f102ef78054ce0b11ee31fddc628b01b4d4a.tar.bz2
ZipEntry.java (setCompressedSize): Allow any argument.
* java/util/zip/ZipEntry.java (setCompressedSize): Allow any argument. (compressedSize): Now 'long'. Default to -1. (getCompressedSize): Rewrote. * java/util/zip/DeflaterOutputStream.java (deflate): Don't deflate at all if we need input. From-SVN: r92969
Diffstat (limited to 'libjava')
-rw-r--r--libjava/ChangeLog9
-rw-r--r--libjava/java/util/zip/DeflaterOutputStream.java3
-rw-r--r--libjava/java/util/zip/ZipEntry.java12
3 files changed, 14 insertions, 10 deletions
diff --git a/libjava/ChangeLog b/libjava/ChangeLog
index b4f7e8e..d3d4191 100644
--- a/libjava/ChangeLog
+++ b/libjava/ChangeLog
@@ -1,5 +1,14 @@
2005-01-05 Tom Tromey <tromey@redhat.com>
+ * java/util/zip/ZipEntry.java (setCompressedSize): Allow any
+ argument.
+ (compressedSize): Now 'long'. Default to -1.
+ (getCompressedSize): Rewrote.
+ * java/util/zip/DeflaterOutputStream.java (deflate): Don't
+ deflate at all if we need input.
+
+2005-01-05 Tom Tromey <tromey@redhat.com>
+
PR libgcj/15719:
* interpret.cc (run) <insn_dcmpl, insn_dcmpg>: Set tmpval
correctly.
diff --git a/libjava/java/util/zip/DeflaterOutputStream.java b/libjava/java/util/zip/DeflaterOutputStream.java
index 4d84f2a..d8a330d 100644
--- a/libjava/java/util/zip/DeflaterOutputStream.java
+++ b/libjava/java/util/zip/DeflaterOutputStream.java
@@ -79,13 +79,12 @@ public class DeflaterOutputStream extends FilterOutputStream
*/
protected void deflate() throws IOException
{
- do
+ while (! def.needsInput())
{
int len = def.deflate(buf, 0, buf.length);
if (len > 0)
out.write(buf, 0, len);
}
- while (! def.needsInput());
}
/**
diff --git a/libjava/java/util/zip/ZipEntry.java b/libjava/java/util/zip/ZipEntry.java
index 201a671..6034327 100644
--- a/libjava/java/util/zip/ZipEntry.java
+++ b/libjava/java/util/zip/ZipEntry.java
@@ -1,5 +1,5 @@
/* ZipEntry.java --
- Copyright (C) 2001, 2002, 2004 Free Software Foundation, Inc.
+ Copyright (C) 2001, 2002, 2004, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -60,7 +60,7 @@ public class ZipEntry implements ZipConstants, Cloneable
private String name;
private int size;
- private int compressedSize;
+ private long compressedSize = -1;
private int crc;
private int dostime;
private short known = 0;
@@ -242,14 +242,10 @@ public class ZipEntry implements ZipConstants, Cloneable
/**
* Sets the size of the compressed data.
- * @exception IllegalArgumentException if size is not in 0..0xffffffffL
*/
public void setCompressedSize(long csize)
{
- if ((csize & 0xffffffff00000000L) != 0)
- throw new IllegalArgumentException();
- this.compressedSize = (int) csize;
- this.known |= KNOWN_CSIZE;
+ this.compressedSize = csize;
}
/**
@@ -258,7 +254,7 @@ public class ZipEntry implements ZipConstants, Cloneable
*/
public long getCompressedSize()
{
- return (known & KNOWN_CSIZE) != 0 ? compressedSize & 0xffffffffL : -1L;
+ return compressedSize;
}
/**