Change InputStream by applying regex on it
问题 I have an InputStream downloaded from the internet. And I need to apply regex on it - so that all occurrences of that regex would be changed to string, wich is provided. I need an InputStream as a return value since it should be forwarded to api. Basically, such signature would be the best: InputStream applyRegex(InputStream stream, Pattern pattern, String changeString){ ... } I have very basic knowledge of working with streams, please give an answer in method form, if it is possible. By the