Index: luni/src/main/java/java/io/PipedOutputStream.java =================================================================== --- luni/src/main/java/java/io/PipedOutputStream.java (revision 429596) +++ luni/src/main/java/java/io/PipedOutputStream.java (working copy) @@ -135,7 +135,10 @@ * If any of the arguments are out of bounds. */ public void write(byte buffer[], int offset, int count) throws IOException { - super.write(buffer, offset, count); + if (dest != null) + super.write(buffer, offset, count); + else + throw new IOException(); } /**