String[] nextLine = null;
List<Airport> list = new ArrayList<Airport>();
try {
while ((nextLine = reader.readNext()) != null) {
Airport airport = new Airport();
airport.setId(nextLine[0]);
airport.setAirportname(nextLine[1]);
airport.setCityName(nextLine[2]);
airport.setCountryName(nextLine[3]);
airport.setIataCode(nextLine[4]);
airport.setLatitude(nextLine[6]);
airport.setLongitude(nextLine[7]);
list.add(airport);
}
} catch (IOException e) {
logger.error("error in :" + nextLine, e);
}