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.
Thank You.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
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
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
i think it is meant for lesser stings like around 10- 50KB
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()
cahnge this to true
private static final boolean debugging = true;
and then run as
java Boyer
see the code in main()
http://www.sun.com/workshop/java/wp-javaio/