diff options
author | Michael Koch <konqueror@gmx.de> | 2003-10-15 14:02:37 +0000 |
---|---|---|
committer | Michael Koch <mkoch@gcc.gnu.org> | 2003-10-15 14:02:37 +0000 |
commit | 6c73e9f7f90083ad3c0821607707d784ca2ef8ca (patch) | |
tree | a634bf2ea252b6868be619219a02042b257a6544 /libjava/java/util | |
parent | 6d98f7a8d0c7adb17408c7e54c408b166a0a8cd1 (diff) | |
download | gcc-6c73e9f7f90083ad3c0821607707d784ca2ef8ca.zip gcc-6c73e9f7f90083ad3c0821607707d784ca2ef8ca.tar.gz gcc-6c73e9f7f90083ad3c0821607707d784ca2ef8ca.tar.bz2 |
2003-10-15 Michael Koch <konqueror@gmx.de>
* java/util/zip/InflaterInputStream.java
(InflaterInputStream): Renamed infl to inf and bufsize to size,
added description to exception, check for inf == null and size < 0.
From-SVN: r72519
Diffstat (limited to 'libjava/java/util')
-rw-r--r-- | libjava/java/util/zip/InflaterInputStream.java | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/libjava/java/util/zip/InflaterInputStream.java b/libjava/java/util/zip/InflaterInputStream.java index 8ee88e5..597ed6b 100644 --- a/libjava/java/util/zip/InflaterInputStream.java +++ b/libjava/java/util/zip/InflaterInputStream.java @@ -70,15 +70,21 @@ public class InflaterInputStream extends FilterInputStream this (in, infl, 512); } - public InflaterInputStream (InputStream in, Inflater infl, int bufsize) + public InflaterInputStream (InputStream in, Inflater inf, int size) { super (in); if (in == null) - throw new NullPointerException(); + throw new NullPointerException ("in may not be null"); + + if (inf == null) + throw new NullPointerException ("inf may not be null"); + + if (size < 0) + throw new IllegalArgumentException ("size may not be negative"); - this.inf = infl; - this.buf = new byte[bufsize]; + this.inf = inf; + this.buf = new byte [size]; } public int read () throws IOException |