code: private IndexInput openMtasFile(SegmentReadState state, String name,
        String extension, Integer minimum, Integer maximum) throws IOException {
      String fileName = IndexFileNames.segmentFileName(state.segmentInfo.name,
          state.segmentSuffix, extension);
      IndexInput object;
      try {
        object = state.directory.openInput(fileName, state.context);
      } catch (FileNotFoundException | NoSuchFileException e) {
        log.debug(e);
        // throw new NoSuchFileException(e.getMessage());
        return null;
      }
      int minVersion = (minimum == null) ? MtasCodecPostingsFormat.VERSION_START
          : minimum.intValue();
      int maxVersion = (maximum == null) ? MtasCodecPostingsFormat.VERSION_CURRENT
          : maximum.intValue();
      try {
        CodecUtil.checkIndexHeader(object, name, minVersion, maxVersion,
            state.segmentInfo.getId(), state.segmentSuffix);
      } catch (IndexFormatTooOldException e) {
        object.close();
        log.debug(e);
        throw new IndexFormatTooOldException(e.getMessage(), e.getVersion(),
            e.getMinVersion(), e.getMaxVersion());
      } catch (EOFException e) {
        object.close();
        log.debug(e);
        // throw new EOFException(e.getMessage());
        return null;
      }
      return object;
    }
docs: Open mtas file.
  
  @param state the state
  @param name the name
  @param extension the extension
  @param minimum the minimum
  @param maximum the maximum
  @return the index input
  @throws IOException Signals that an I/O exception has occurred.