Fork me on GitHub
#clojure
<
2022-10-16
>
Tij10:10:40

I have a zipinputstream and i want to parse multiple xml entries from it. But clojure.xml/parse closes the stream when it parses a single entry. Someone knows how to prevent that?

phill10:10:01

You can put a proxy InputStream or Reader around the real one, and the proxy can intercept and ignore the close. This solution is available off-the-shelf in the Apache commons-io library: CloseShieldInputStream and CloseShieldReader

1
🙌 1