code: protected synchronized void makeIndex() throws Exception {
          File indexFile = getIndexFile(filename);
          if (indexFile.exists()) try {
              loadIndex(indexFile);
              setIndexCreated(true);
              return;
          } catch (Exception x) {
              logger.warn(x.getMessage());
          }
          indexCreated = false;
          long now = System.currentTimeMillis();
          int recordLength = 1000;
          int maxRecords = 1;
          int maxRecordLength = 0;
          maxRecords = (int) raFile.length() / recordLength;
          if (maxRecords == 0) maxRecords = 1;
          index = new long[maxRecords][3];
  
          String s = null;
          long start = 0;
          long end = 0;
          raFile.seek(0);
          records = 0;
          recordLength = 0;
          while ((s = raFile.readLine()) != null) {
              if (start == -1) start = raFile.getFilePointer();
              if (isRecordEnd(s)) {
                  //fireFrameRead();
                  if (records >= maxRecords) {
                      index = resize(index,
                              records
                                      + (int) (records + (raFile.length() - records * raFile.getFilePointer())
                                              / recordLength));
                  }
                  end += 4;
                  index[records][0] = start;
                  index[records][1] = end - start;
                  index[records][2] = -1;
                  if (maxRecordLength < index[records][1]) maxRecordLength = (int) index[records][1];
                  records++;
                  recordLength += end - start;
  
                  start = raFile.getFilePointer();
              } else {
                  end = raFile.getFilePointer();
              }
  
          }
          b = new byte[maxRecordLength];
          //fireFrameRead();
          logger.info("Index created in " + (System.currentTimeMillis() - now) + " ms.");
          try {
              saveIndex(indexFile);
          } catch (Exception x) {
              logger.error(x);
          }
      }
docs: The index file {@link #getIndexFile(String)} is loaded, if already exists, or created a new.
  @throws Exception