Код: Выделить всё
FileOutputStream fos = new FileOutputStream("tbox.dat");
ObjectOutputStream oos = new ObjectOutputStream(fos);
oos.writeObject(tboxObject);
oos.flush();
oos.close();
< /code>
Это для первого запуска, после этого я поменял код на: < /p>
FileInputStream fis = new FileInputStream("tbox.dat");
ObjectInputStream ois = new ObjectInputStream(fis);
tboxObject savedTboxObject = (tboxObject) ois.readObject();
Подробнее здесь: https://stackoverflow.com/questions/652 ... o-bin-file
Мобильная версия