code: public static HarIndex getHarIndex(FileSystem fs, Path initializer)
        throws IOException {
      if (!initializer.getName().endsWith(HAR)) {
        initializer = initializer.getParent();
      }
      InputStream in = null;
      try {
        Path indexFile = new Path(initializer, INDEX);
        FileStatus indexStat = fs.getFileStatus(indexFile);
        in = fs.open(indexFile);
        HarIndex harIndex = new HarIndex(in, indexStat.getLen());
        harIndex.harDirectory = initializer;
        return harIndex;
      } finally {
        if (in != null) {
          in.close();
        }
      }
    }
docs: Creates a HarIndex object with the path to either the HAR
  or a part file in the HAR.