Get the number of lines and characters in a file using Java