Index: luni/src/main/java/java/io/BufferedInputStream.java =================================================================== --- luni/src/main/java/java/io/BufferedInputStream.java (revision 428373) +++ luni/src/main/java/java/io/BufferedInputStream.java (working copy) @@ -118,6 +118,10 @@ private int fillbuf() throws IOException { if (markpos == -1 || (pos - markpos >= marklimit)) { + if(in == null){ + buf = null; + throw new IOException("Stream closed"); + } /* Mark position not set or exceeded readlimit */ int result = in.read(buf); if (result > 0) {