title: Error java.lang.NumberFormatException: For input string: ""
body: <p>I'm trying to read this file</p>
  
  <pre><code>C101
  
  VEHICLE
  NUMBER     CAPACITY
    25         200
  
  CUSTOMER
  CUST NO.  XCOORD.   YCOORD.    DEMAND   READY TIME  DUE DATE   SERVICE   TIME
  
      0      40         50          0          0       1236          0   
      1      45         68         10        912        967         90   
      2      45         70         30        825        870         90   
      3      42         66         10         65        146         90   
      4      42         68         10        727        782         90   
      5      42         65         10         15         67         90   
      6      40         69         20        621        702         90   
      7      40         66         20        170        225         90   
      8      38         68         20        255        324         90   
  </code></pre>
  
  <p>But when I read the file, the program throws me this exception:</p>
  
  <pre><code>Exception in thread "main" java.lang.NumberFormatException: For input string: ""
      at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
      at java.lang.Integer.parseInt(Integer.java:504)
      at java.lang.Integer.parseInt(Integer.java:527)
      at VRP.main(VRP.java:43)
  Java Result: 1
  BUILD SUCCESSFUL (total time: 0 seconds)
  </code></pre>
  
  <p>I cheked my code and debugged, but I can't find the problem.</p>
  
  <p>I used an array to save all the spaces between the columns (I only read the first four columns) and then an ArrayList but it doesn't worked.</p>
  
  <pre><code>    public static void main(String[] args) throws Exception {
  
      File f = new File("C101.txt");
      FileReader fr = new FileReader(f);
      BufferedReader reader = new BufferedReader(fr);
  
      String nada = reader.readLine();  //C101
      nada = reader.readLine();         //espacio en blanco
      nada = reader.readLine();         //vehicle=25
      nada = reader.readLine();         //number, capacity
      nada = reader.readLine();         //25, 200
      nada = reader.readLine();         //espacio en blanco
      nada = reader.readLine();         //customer
      nada = reader.readLine();         //encabezados
      nada = reader.readLine();         //espacio en blanco
  
      String[] espacios;
      int capacity = 200;
      int custno, xcoord, ycoord, demand;
  
      ArrayList&lt;String&gt; guardar = new ArrayList&lt;String&gt;();
  
      while (reader.ready()) {
          espacios = reader.readLine().trim().split(" ");
          for (int i = 0; i &lt; espacios.length; i++) {
              guardar.add(espacios[i]);
          }
          custno = Integer.parseInt(espacios[0]);
          xcoord = Integer.parseInt(espacios[1]);
          ycoord = Integer.parseInt(espacios[2]);
          demand = Integer.parseInt(espacios[3]);
      }
  }
  </code></pre>
  
  <p>Sorry for the inconvenient and thank you for your time.</p>