Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

java input output stream

Tags:

java

Does anyone have any good suggestions for creating a Pipe object in Java which is both an InputStream and and OutputStream since Java does not have multiple inheritance and both of the streams are abstract classes instead of interfaces?

like image 722
Asra Nisar Avatar asked Nov 04 '22 11:11

Asra Nisar


2 Answers

java.io.PipedInputStream

java.io.PipedOutputStream

like image 89
Michael Borgwardt Avatar answered Nov 15 '22 10:11

Michael Borgwardt


check Pipe class for a ready made implementation

or the PipedInputStream and PipedOutputStream pair

like image 20
ratchet freak Avatar answered Nov 15 '22 12:11

ratchet freak