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.io.File;
import java.util.ArrayList;
import java.io.IOException;

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>(); 
	
	while(scan.hasNextLine()){
		
		String hold = scan.nextLine();
		arr.add(hold);
		
	}
	
	for(String each: arr){System.out.println(each);}

}}