[android-developers] Loading a serialized file into Android Problem
Here is what I am trying to do:
1.) Create a serialized file,
2.) Write it to the SD Card
3.) Take the resulting file and include it in either the Assets folder
or raw folder of my app
4.) Load a hashtable from that file
My data source is a CSV of 50,000+ words (and nothing else).
So far, creating the file is not a problem...that part seems to work
fine. My problem is that if I attempt to load the file from the assets
or raw folder, I am having unending problems of all descriptions.
I have tried literally everything...this, for example, returns "
08-10 19:27:16.076: VERBOSE/This file can not be opened as a file
descriptor; it is probably compressed(7397): message"
AssetFileDescriptor assetFileDescriptor =
getAssets().openFd("dictionaryser.ser");
FileInputStream fis = new
FileInputStream(assetFileDescriptor.getFileDescriptor());
ObjectInputStream ois = new ObjectInputStream(fis);
Map dictionaryMap = (Map) ois.readObject();
ois.close();
--
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