String[] nextLine;
while ((nextLine = csv.readNext()) != null) {
if (nextLine.length <= 1) {
continue;
} else if (nextLine.length != result.getHeaderCount()) {
throw new AIFHError("Found a CSV line with "
+ nextLine.length + " columns, when expecting " + result.getHeaderCount());
}
final Object[] obj = new Object[result.getHeaderCount()];
System.arraycopy(nextLine, 0, obj, 0, nextLine.length);
result.add(obj);
}
csv.close();
} catch (IOException ex) {
throw (new AIFHError(ex));
}
return result;
}