public static void checkFileParamsCompatible(@NotNull Path storagePath,
                                               @NotNull ChunkedAppendOnlyLogOverMMappedFile.FileHeader header,
                                               int pageSize) throws IOException {

    int magicWord = header.readMagicWord();
    if (magicWord != MAGIC_WORD) {
      throw new IOException(
        "[" + storagePath + "] is of incorrect type: " +
        ".magicWord(=" + magicWord + ", '" + magicWordToASCII(magicWord) + "') != " + MAGIC_WORD + " expected");
    }

    int implementationVersion = header.readImplementationVersion();
    if (implementationVersion != CURRENT_IMPLEMENTATION_VERSION) {
      throw new IOException(
        "[" + storagePath + "].implementationVersion(=" + implementationVersion + ") is not supported: " +
        CURRENT_IMPLEMENTATION_VERSION + " is the currently supported version.");
    }

    int filePageSize = header.readPageSize();
    if (pageSize != filePageSize) {
      throw new IOException(
        "[" + storagePath + "]: file created with pageSize=" + filePageSize +
        " but current storage.pageSize=" + pageSize);
    }
  }
public static void checkFileParamsCompatible(@NotNull Path storagePath,
                                               @NotNull ChunkedAppendOnlyLogOverMMappedFile.FileHeader header,
                                               int pageSize)