you have several layers of wrapping into UncloseableDataInputStream if not one.
It looks like it should be done only once in this method.