Interface IMediaTypeScanService

    • Method Detail

      • detectMediaType

        String detectMediaType​(String fileName,
                               byte[] fileData)
        Detects the media type of a given document.
        Parameters:
        fileData - the first few bytes of document data
        Returns:
        media type of the document
      • isFileOfMediaType

        default boolean isFileOfMediaType​(String fileName,
                                          byte[] fileData,
                                          String mediaType)
        Checks a given document if it is of a given media type.
        Parameters:
        fileName - file name
        fileData - the first few bytes of document data
        mediaType - media type
        Returns:
        true if a given document is of a given media type, otherwise false