Link to home
Start Free TrialLog in
Avatar of Imelda
Imelda

asked on

text search

Hi, now i just want to ask if you have a source code (in java ,of cource) about fast text searching  in a plain text file? The plain text file would be about 2 Mbytes.
Thank You.
ASKER CERTIFIED SOLUTION
Avatar of mbormann
mbormann

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I still think that u r wrong in acceppting my comment as answer,tell me full requirement ,this is totally inefficient way of doing it
Avatar of Imelda

ASKER

what do you mean ?
i mean that u can't do a indexOf() in a 2MB string.
i think it is meant for lesser stings like around 10- 50KB
Avatar of Imelda

ASKER

I think not only that, the code that u send cannot be run by java. When I run it with 'java Boyer' it said that the main java.lang.NoClassDefFound.Error : Boyer. Why ? There is main in the class.
remove package statement at fromt of file,then
cahnge this to true
private static final boolean debugging = true;
and then run as
java Boyer

see the code in main()