private int extractInt(String key,CSVRecord record) throws FormatException {
  if (record.isMapped(key) == false) {
    throw new FormatException("Field not used but expected: " + key);
  }
  try {
    return Integer.parseInt(record.get(key));
  }
 catch (  NumberFormatException e) {
    throw new FormatException("Failed to parse field: " + key,e);
  }
}

private int extractInt ( String key , CSVRecord record ) throws FormatException { if ( record . isMapped ( key ) == false ) { throw new FormatException ( "Field not used but expected: " + key ) ; } try { return Integer . parseInt ( record . get ( key ) ) ; } catch ( NumberFormatException e ) { throw new FormatException ( "Failed to parse field: " + key , e ) ; } }
extract an integer from the items array . the index into the array is determined by looking up the index in the fields map using the " key " as the key . if no such key exists , or the data is not a valid int , a formatexception is thrown .
