BufferedReader in = new BufferedReader(new FileReader(file));
try {
List<SimpleContact> contacts = new ArrayList<SimpleContact>();
String line;
while ((line = in.readLine()) != null) {
SimpleContact contact = new SimpleContact();
StringTokenizer t = new StringTokenizer(line, separator);
if (t.hasMoreTokens()) contact.setFirstname(t.nextToken());
if (t.hasMoreTokens()) contact.setLastname(t.nextToken());
if (t.hasMoreTokens()) contact.setFaxNumber(t.nextToken());
if (t.hasMoreTokens()) contact.setCompany(t.nextToken());
getSelectedContactCollection().add(contact);
contacts.add(contact);
}
return contacts.toArray(new SimpleContact[0]);
}