serisini/ItemList nerede olduğunu bir <code>ArrayList<ItemList></code></p> <p>var arrayList (Object)
try {
FileOutputStream fileOut = new FileOutputStream(sdDir + serFile);
ObjectOutputStream out = new ObjectOutputStream(fileOut);
out.writeObject(List_Of_Lists);
out.close();
fileOut.close();
} catch (FileNotFoundException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
Ben thi İşe yaramıyor, bu dosyayı klasörde buluyorum.
Ama ArrayList<ItemList>
koduna dosyadan kaldırılamıyor:
try {
FileInputStream fileIn = new FileInputStream(sdDir + serFile);
ObjectInputStream in = new ObjectInputStream(fileIn);
List_Of_Lists = (ArrayList<ItemList>) in.readObject();
Log.i("palval", "dir.exists()");
in.close();
fileIn.close();
} catch (ClassNotFoundException e) {
e.printStackTrace();
} catch (FileNotFoundException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
Bu ArrayList<ItemList>
serisini nasıl? Her zaman IOException'ı yakalarım. Eğer alt sınıf daha sonra ebeveyne serializabe yöntemi eklemek yaptıysanız sana ItemList değil Öğe tefrika varsayarak am
Lütfen istisnai stacktrace'i gönderin – Tomer
Arraylist'i sadece "it" değişkeni mi, yoksa itemList sınıfını mı serileştiriyorsunuz? – prashant
'IOException'ı her zaman yakalarım. Evet, içerdiği mesajı okudun mu? Cevabı içerir. – EJP