import java.util.*;
import java.io.*;

public class Batch
{
    public static char DELIMITER = ':';
    public static char SPACE = ' ';

    public static Vector<Passwport> loadData (String inputFile, boolean debug)
    {
        /*
         * Open the data file and read it in.
         */

        BufferedReader reader = null;
        Vector<Passport> results = new Vector<Passport>();

        try
        {
            reader = new BufferedReader(new FileReader(inputFile));
            String line = null;

            while ((line = reader.readLine()) != null)
            {
                int rangeDelimiter = line.indexOf(RANGE_DELIMITER);
                int space = line.indexOf(SPACE);
                String minimum = line.substring(0, rangeDelimiter);
                String maximum = line.substring(rangeDelimiter +1, space);
                int passwordDelimiter = line.indexOf(PASSWORD_DELIMITER);
                String letter = line.substring(space +1, passwordDelimiter);
                String password = line.substring(passwordDelimiter +1).trim();

                if (debug)
                {
                    System.out.println("\nLoaded < "+minimum+", "+maximum+" >");
                    System.out.println("Letter: "+letter);
                    System.out.println("Password to check: "+password);
                }

                PasswordPolicy policy = new PasswordPolicy(Integer.parseInt(minimum), Integer.parseInt(maximum), letter.charAt(0));

                results.add(new PasswordData(policy, password));
            }
        }
        catch (Throwable ex)
        {
            ex.printStackTrace();
        }
        finally
        {
            try
            {
                reader.close();
            }
            catch (Throwable ex)
            {
            }
        }

        return results;
    }

    private Batch ()
    {
    }
}
@@ -567,32 +567,376 @@
 )%0A            %7B%0A
+                if (line.length() %3E 0) // blank?%0A                %7B%0A                    int byr = 0;%0A                    int iry = 0;%0A                    int eyr = 0;%0A                    int hgt = 0;%0A                    String hcl = %22%22;%0A                    String ecl = %22%22;%0A                    int pid = 0;%0A                    int cid = 0;%0A%0A    
                 
@@ -999,24 +999,28 @@
             
+   
+ 
 int space = 
@@ -1040,16 +1040,20 @@
 SPACE);%0A
+    
         
@@ -1120,32 +1120,36 @@
                 
+ 
+   
 String maximum =
@@ -1191,16 +1191,20 @@
 space);%0A
+    
         
@@ -1277,32 +1277,36 @@
                 
+    
 String letter = 
@@ -1362,24 +1362,28 @@
             
+  
+  
 String passw
@@ -1446,24 +1446,28 @@
             
+    
 if (debug)%0A 
@@ -1473,34 +1473,41 @@
                 
-%7B%0A
+    %7B%0A   
                 
@@ -1502,32 +1502,33 @@
                 
+ 
 System.out.print
@@ -1584,32 +1584,36 @@
                 
+    
 System.out.print
@@ -1647,32 +1647,36 @@
                 
+  
+  
 System.out.print
@@ -1711,16 +1711,20 @@
 sword);%0A
+    
         
@@ -1750,16 +1750,20 @@
         
+    
 Password
@@ -1887,16 +1887,20 @@
         
+    
 results.
@@ -1936,24 +1936,42 @@
 password));%0A
+                %7D%0A
             

Update Batch.java