Shikhar13 / codenameone

Automatically exported from code.google.com/p/codenameone
0 stars 0 forks source link

RFE: Enable export/import of the file used by io.Storage,e.g. for the purpose of backup/move to new device #156

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
For applications that use io.Storage (e.g. apps ported from J2ME RMS), it would 
be very useful to be able to export the underlying file used by Storage, e.g. 
to backup your data, or to export your data if you move to new device. 

Moving to a new device would of course require that the  file format is the 
same on all platforms (Blackberry, Android, ...). I haven't checked if that's 
already the case. 

What is the expected output? What do you see instead?
I guess an interface like getStorageFile(), putStorageFile() would suffice. 

Original issue reported on code.google.com by ch.hj...@gmail.com on 15 Apr 2012 at 10:29

GoogleCodeExporter commented 9 years ago
Generally there are some complexities with making something like this that's 
generic enough yet useful enough to all those involved. I'm not sure if it 
would be useful as part of the API.

It should be trivial to load the data using: listEntries() and 
createInputStream()
And to save the data when exporting using createOutputStream().

However, where and in what format should the data be stored. That's something 
that's either trivial or really difficult. 

Original comment by shai.almog on 15 Apr 2012 at 6:26