Read text file and search contents

by CompuCor » Tue, 14 Apr 2009 00:58:41 GMT


Sponsored Links
 Greetings,

I am new to Java and Android.  I have a flat file (pipe-delimited)
stored in R.raw called wordlist.txt.  I want to open this file and
quickly search for a word I pass into my procedure.

I've been searching for a simple way to do this but not having much
luck.

Can anyone share some code on how to do this?

Thanks SO much for any help!

--~--~---------~--~----~------------~-------~--~----~



Read text file and search contents

by Charlie Collins » Tue, 14 Apr 2009 02:06:43 GMT


 Here is a basic example of reading a raw resource:
 http://unlocking-android.googlecode.com/svn/chapter5/trunk/FileStorage/src/com/msi/manning/chapter5/filestorage/ReadRawResourceFile.java. 





--~--~---------~--~----~------------~-------~--~----~


Sponsored Links


Other Threads

1. How to launch activity act2.class (contained in project2.apk) from activity1 in project1.apk ?

hi,

try this:

Intent intent = new Intent();
                                intent.setComponent(new 
ComponentName("gal.com.app",
"gal.com.app.gallery"));
                                startActivity(intent);

Where gal.com.app is the name of the other package in which the other
activity resides and gal.com.app.gallery is the application name
appended with the name of the activity in the other package





--~--~---------~--~----~------------~-------~--~----~

2. SoftKeyboard - detecting pressed key

Hi,

I am currently developing an android app which opens the soft keyboard
in order to get an input from the user.
I would like to detect when the user has finished using the soft
keyboard by clicking the "Done" key.
Is there anyway I can do it? Is there some kind of event that I can
catch to detect that the user pressed the "Done" key or that the soft
keyboard was closed?

Thanks,
Hilly

--~--~---------~--~----~------------~-------~--~----~

3. Choosing a reliable Web Hosting company

4. Android 2.0 Google Maps Navigation and app use of turn-by-turn directions?

5. Example Needed: a view containing a reference to its activity

6. First QVGA Android Phone 鈥?H TC Tattoo鈩?鈥?on sale October 2009. Is your application r eady?

7. use data network while connected to wifi