diff options
Diffstat (limited to 'libjava/classpath/java/io/PushbackInputStream.java')
-rw-r--r-- | libjava/classpath/java/io/PushbackInputStream.java | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/libjava/classpath/java/io/PushbackInputStream.java b/libjava/classpath/java/io/PushbackInputStream.java index 71cf244274e..ff202c72df1 100644 --- a/libjava/classpath/java/io/PushbackInputStream.java +++ b/libjava/classpath/java/io/PushbackInputStream.java @@ -116,7 +116,14 @@ public class PushbackInputStream extends FilterInputStream */ public int available() throws IOException { - return (buf.length - pos) + super.available(); + try + { + return (buf.length - pos) + super.available(); + } + catch (NullPointerException npe) + { + throw new IOException ("Stream closed"); + } } /** |