From 34043bd2e9ad8e2c582e5893838d9694e1796998 Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Wed, 23 Jun 1999 14:57:14 +0000 Subject: 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 --- libjava/java/util/zip/InflaterInputStream.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'libjava/java/util/zip') diff --git a/libjava/java/util/zip/InflaterInputStream.java b/libjava/java/util/zip/InflaterInputStream.java index 7ee4455..7471247 100644 --- a/libjava/java/util/zip/InflaterInputStream.java +++ b/libjava/java/util/zip/InflaterInputStream.java @@ -67,7 +67,14 @@ public class InflaterInputStream extends FilterInputStream fill (); if (inf.needsDictionary()) 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 -- cgit v1.1