Q:

How can I create an index file in java?

I want to create an index file from a very large text file in java. Actually I want to keep the number and the byte of the first character in each line in the index file.I am going to use it to do searching as fast as possible in my original file. 
It will be great if someone can help me with a sample code.

A:

Have you checked Apache Lucene?

