我想通过管道流来复制文件,这是我的代码,不过出现问题了,求大神给看看,该怎么解决呢?
这是出现的问题:
java.io.IOException: Pipe closed
at java.io.PipedInputStream.read(PipedInputStream.java:308)
at java.io.PipedInputStream.read(PipedInputStream.java:378)
at java.io.InputStream.read(InputStream.java:101)
at StreamDemo.outputStream.run(PipedStreamDemo.java:117)
at java.lang.Thread.run(Thread.java:744)
java.io.IOException: Pipe closed
at java.io.PipedInputStream.checkStateForReceive(PipedInputStream.java:261)
at java.io.PipedInputStream.receive(PipedInputStream.java:227)
at java.io.PipedOutputStream.write(PipedOutputStream.java:149)
at java.io.OutputStream.write(OutputStream.java:75)
at StreamDemo.inputStream.run(PipedStreamDemo.java:70)
at java.lang.Thread.run(Thread.java:744) |
|