Sunday, July 29, 2012

Re: [android-developers] Storing an array of floats in SD Card

You can use Float.toString to convert these values into strings so you can write them into a regular text file, one by line or using some separator (i.e. 1.13:3.1416:8:...) You can load them further and convert again to float using Float.parseFloat.

If you care a lot about speed and storing space, then you will need to dump the raw array to a file using a binary steam.

El 26/07/2012 08:38, "sterva7" <esther.vasiete@gmail.com> escribió:
Hi,

I'd like to save an array of floats to the sdcard so later I can add it to my resource files to read it on my [other] application. Let's say it will be an array of 5000 floats. Can I do this? How? Is there any example I can use?

Thanks!

--
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

--
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