I've implemented my own consumer for eurofxref-hist.xml but there is no reason the have the file two times or have it downloaded two times, when it's the same resource. This library gives the impression that reusing resource for two exchange rate providers is completely fine so I went with it. Turns out, when two "listeners" both receive the same InputStream and they both try to read it, only the first one gets the data and for the second one the InputStream looks empty.
Solution
For every listener, there has to be a new fresh InputStream.
The problem
I've implemented my own consumer for
eurofxref-hist.xml
but there is no reason the have the file two times or have it downloaded two times, when it's the same resource. This library gives the impression that reusing resource for two exchange rate providers is completely fine so I went with it. Turns out, when two "listeners" both receive the same InputStream and they both try to read it, only the first one gets the data and for the second one the InputStream looks empty.Solution
For every listener, there has to be a new fresh
InputStream
.This change is