Reading file asynchronously in Java