InflaterInputStream.java (read): Throw ZipException if inflater throws a DataFormatException.

* java/util/zip/InflaterInputStream.java (read): Throw
	ZipException if inflater throws a DataFormatException.

From-SVN: r27719
This commit is contained in:
Tom Tromey 1999-06-23 14:57:14 +00:00 committed by Tom Tromey
parent d71ef9d4a6
commit 34043bd2e9
2 changed files with 13 additions and 1 deletions

View File

@ -1,3 +1,8 @@
1999-06-23 Tom Tromey <tromey@cygnus.com>
* java/util/zip/InflaterInputStream.java (read): Throw
ZipException if inflater throws a DataFormatException.
1999-06-23 Warren Levy <warrenl@cygnus.com> 1999-06-23 Warren Levy <warrenl@cygnus.com>
* java/net/DatagramSocketImpl.java (localPort): Fixed typo to match JDK. * java/net/DatagramSocketImpl.java (localPort): Fixed typo to match JDK.

View File

@ -67,7 +67,14 @@ public class InflaterInputStream extends FilterInputStream
fill (); fill ();
if (inf.needsDictionary()) if (inf.needsDictionary())
return -1; return -1;
return inf.inflate(buf, off, len); try
{
return inf.inflate(buf, off, len);
}
catch (DataFormatException dfe)
{
throw new ZipException (dfe.getMessage());
}
} }
public long skip (long n) throws IOException public long skip (long n) throws IOException