Class WellKnownFileExtensionsUtils

java.lang.Object
io.qameta.allure.util.WellKnownFileExtensionsUtils

public final class WellKnownFileExtensionsUtils extends Object
Utility methods to resolve well-known attachment file extensions.

The main mapping mirrors the Allure JS EXTENSIONS_BY_TYPE table to keep preferred attachment suffixes aligned across adapters. Java adds compatibility aliases for Allure vendor content types.

  • Method Details

    • getExtensionByMimeType

      public static String getExtensionByMimeType(String contentType)
      Returns a well-known file extension for the given content type.
      Parameters:
      contentType - the content type to resolve
      Returns:
      file extension with a leading dot, or an empty string when the content type is unknown