Trouble reading INF files

When I try and scan-in an INF file with this code often it fails to scan, and I’m left with zero entries in the arr ArrayList. I say often, because sometimes with INF files it does work and sometimes not, I don’t know why…

import java.util.Scanner;
import java.util.ArrayList;

public class java_canvas {
public static void main (String[] args) throws IOException{
	File in = new File(/*file-path with INF file-extension*/);
	Scanner scan = new Scanner(in); 
	ArrayList<String> arr = new ArrayList<String>(); 
		String hold = scan.nextLine();
	for(String each: arr){System.out.println(each);}