/**
  * @param offset file pointer to start reading lines from
  * @param prefixArr prefix to search forward for
  * @return offset where the search found the first match or EOF
  * @throws IOException if an I/O exception occurs while searching
  */
 public long search(long offset, char[] prefixArr) throws IOException {
   // debug
   // System.out.println(offset + " - " + prefix);
   String tmpStr;
   ffReadLine.seek(offset);
   if (offset > 0) {
     ffReadLine.readLine();
   }
   while (true) {
     offset = ffReadLine.filePointer;
     tmpStr = ffReadLine.readLine();
     if (tmpStr == null) {
       break;
     }
     if (psComparator.comparePrefix(prefixArr, tmpStr.toCharArray()) <= 0) {
       break;
     }
   }
   ffReadLine.reset();
   return offset;
 }