A simple read file routine in java