Class ContentTypeHelper

    • Constructor Detail

      • ContentTypeHelper

        ContentTypeHelper()
    • Method Detail

      • findByFileName

        @Nullable() static String findByFileName(@Nullable() String fileName)

        Get the type by truncating the lowercase extension in the filename.

        Parameters:
        fileName - `file.
        Returns:

        ContentType

      • findByFileName

        @NotNull() static String findByFileName(@Nullable() String fileName, @NotNull() String elseType)

        Get the type by truncating the lowercase extension in the filename.

        Parameters:
        fileName - `file.
        elseType - else value if not found.
        Returns:

        ContentType

      • mediaTypeByUri

        @NotNull() static MediaType mediaTypeByUri(@Nullable() String fileName, @NotNull() MediaType elseType)