code: public int getHarVersion() throws IOException {
      FSDataInputStream masterIn = fs.open(masterIndex);
      LineReader lmaster = new LineReader(masterIn, getConf());
      Text line = new Text();
      lmaster.readLine(line);
      try {
        masterIn.close();
      } catch(IOException e){
        //disregard it.
        // its a read.
      }
      String versionLine = line.toString();
      String[] arr = versionLine.split(" ");
      int version = Integer.parseInt(arr[0]);
      return version;
    }
docs: of archives