private void readRandomContacts() throws IOException
{
BufferedReader bufRdr;
contacts = new ArrayList<Contacts>();
File randomContactsFile = new File("C:\randomContacts.csv");
try {
bufRdr = new BufferedReader(new FileReader(randomContactsFile));
String line = null;
String[] a = new String[2];
while ((line = bufRdr.readLine()) != null)
{
a = line.split(",");
Contacts c = new Contacts(a[0], a[1], a[1], a[1], a[2]);
contacts.add(c);
}
} catch (FileNotFoundException e) {
Log.d("file not found", "check");
e.printStackTrace();
}
Je ne peux pas sembler lui faire trouver le fichier et randomContacts.csv existe en effet dans le répertoire C. Toute aide s'il vous plaît?ne peut pas trouver le fichier
est-il lancer une exception? – smp7d
oui une exception filenotfound! :/ – michelle