Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / July 2007

Tip: Looking for answers? Try searching our database.

seaching a file

Thread view: 
ruds - 13 Jul 2007 11:40 GMT
Hi,
Is there a way for file searching in which i can find a string which
occurs after certain interval again in the file?
The file that i'm dealing with is in GB's so the searching has to be
fast.
Knute Johnson - 13 Jul 2007 17:23 GMT
> Hi,
> Is there a way for file searching in which i can find a string which
> occurs after certain interval again in the file?
> The file that i'm dealing with is in GB's so the searching has to be
> fast.

Yes!

Signature

Knute Johnson
email s/nospam/knute/

Flo 'Irian' Schaetz - 13 Jul 2007 17:30 GMT
And thus spoke ruds...

> Is there a way for file searching in which i can find a string which
> occurs after certain interval again in the file?
> The file that i'm dealing with is in GB's so the searching has to be
> fast.

http://www.nist.gov/dads/

Have fun. You're probably searching for a text searching algorithm like
Boyer-Moore, but as long as the description is as vague as that, I can't
say which one will be the best.

Flo
Roedy Green - 13 Jul 2007 20:50 GMT
>http://www.nist.gov/dads/
>
>Have fun. You're probably searching for a text searching algorithm like
>Boyer-Moore, but as long as the description is as vague as that, I can't
>say which one will be the best.

see http://mindprod.com/jgloss/products.html#BOYER
--
Roedy Green Canadian Mind Products
The Java Glossary
http://mindprod.com
Flo 'Irian' Schaetz - 14 Jul 2007 00:56 GMT
And thus spoke Roedy Green...

> see http://mindprod.com/jgloss/products.html#BOYER

404
Andrew Thompson - 14 Jul 2007 05:11 GMT
>And thus spoke Roedy Green...
>
>> see http://mindprod.com/jgloss/products.html#BOYER
>
>404

I suspect Roedy actually meant..
<http://mindprod.com/products.html>, which leads to..
<http://mindprod.com/products1.html#BOYER>

Signature

Andrew Thompson
http://www.athompson.info/andrew/

Roedy Green - 13 Jul 2007 17:46 GMT
>Hi,
>Is there a way for file searching in which i can find a string which
>occurs after certain interval again in the file?
>The file that i'm dealing with is in GB's so the searching has to be
>fast.

Do a read starting at the offset, reading the entire file into ram.
See http://mindprod.com/applet/fileio.html for how.

Then use String.indexOf or a regex search .  See
http://mindprod.com/jgloss/regex.html

--
Roedy Green Canadian Mind Products
The Java Glossary
http://mindprod.com


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.