Sunday, April 25, 2010

[android-developers] Saving ArrayList to .txt file

Hi,

I am trying to save an array list to a .txt file below is the code I
am using, which runs without error but when I try to go to Astro file
manager and browse the data folder there is nothing there.

String filename = stationname.getText().toString() +
System.currentTimeMillis();

FileOutputStream fos = openFileOutput(filename,Context.MODE_PRIVATE);
ObjectOutputStream out = new ObjectOutputStream(fos);
out.writeObject(report); //Report is the ArrayList that holds each of
my station Reports.
out.close();

Any advice would be greatly appreciated.

Thanks for your time,

Tommy

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate