Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to copy/split an inputstream in java?

Is there a way to copy/split an input stream into two input streams similar to apache commons TeeOutputStream? I am trying to filter some input from the stream while displaying the entire input stream in another thread.

like image 282
user1100210 Avatar asked Dec 29 '25 02:12

user1100210


1 Answers

Use org.apache.commons.io.input.TeeInputStream

like image 133
Leif Avatar answered Dec 31 '25 15:12

Leif