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.
*/
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());
}
/**
/* 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.
private String name;
private int size;
- private int compressedSize;
+ private long compressedSize = -1;
private int crc;
private int dostime;
private short known = 0;
/**
* 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;
}
/**
*/
public long getCompressedSize()
{
- return (known & KNOWN_CSIZE) != 0 ? compressedSize & 0xffffffffL : -1L;
+ return compressedSize;
}
/**