Close stream after each iteration for both jibx and jaxb